# Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

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
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
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
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

Community Browser