Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

mario-sarkis
Contributor II

Percentage in a line chart


hey all

I am claculation a percentage in a line chart but i have a problem

when calculating the percentage i realize that there is some result has an answer greater then 100% at i don't want to show on the chart i need to show only that has a percentage less then 100 %.

Help Anyone ??

Thank you.

1 Solution

Accepted Solutions
Highlighted
MVP & Luminary
MVP & Luminary

Re: Percentage in a line chart

Put an if statement around your expression: =if( ...expression... >=1, 0, ...expression... )


talk is cheap, supply exceeds demand
2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Percentage in a line chart

Put an if statement around your expression: =if( ...expression... >=1, 0, ...expression... )


talk is cheap, supply exceeds demand
datanibbler
Esteemed Contributor

Re: Percentage in a line chart

Hi,

you can build an IF_clause into your formula to calculate it only if the result is less than 100%.

There is also, on the "formula" tab  of the dialog, an edit_field for a "condition", but i don't think that will work in your case. Or you can set a background_colour (when you click on the little PLUS_sign next to your formula) that, in case a percentage goes over 100%, matches your charting_area_colour so that it becomes invisible.

HTH