Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to filter on an expression in a chart ??

Hi,

Here is my problem :

Got a chart with the following datas :

Code Production_Month_M-1 Production_Month_M
AAA 48 0
BBB 15 16
CCC 12 0
DDD 7 5

I would see only the line with a Production_Month_M =0

I tried this expression :

=if((sum({$<Month={$(VMonthM)}>}[production.PROD]))=0,(sum({$<Month={$(VMonthM)}>}[production.PROD])))

and i have :

Code Production_Month_M-1 Production_Month_M
AAA 48 0
BBB 15 -
CCC 12 0
DDD 7 -

instead of :

Code Production_Month_M-1 Production_Month_M
AAA 48 0
CCC 12 0

Thanks for your help !!!

3 Replies
Not applicable
Author

You need to put the same Set Analysis filter on the first expression. By default, QlikView will suppress rows where all expressions are null. Since you have values on the first expression for those records, they are displaying, even when the second expression is null.

Maybe:

=if((sum({$<Month={$(VMonthM-1)}>}[production.PROD]))=0,
(sum({$<Month={$(VMonthM-1)}>}[production.PROD])))


I'm not sure what your expression is for the first expression, so that is a bit of a guess.

Not applicable
Author

Ok ! that's working ! Big Smile

thank you so much !!!

Not applicable
Author

What if I have a very wide tables with 10+ columns, does that mean I have to put that Logic in every single column?