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: 
clovati
Partner - Creator
Partner - Creator

Hiding rows with zero on value in expression

Hi all.

I should optionally hide rows that have zero value in one expression.


Dim1Expr1Expr2
a1001000
b2002000
c3000
d4003000
e5000
f6000


By a button I wish to hide rows c,e,f, even if Expr2 has values that are not zero.

I don't want to add 'searchable' in 'presentation tab'.

Thanks!!!!

1 Solution

Accepted Solutions
clovati
Partner - Creator
Partner - Creator
Author

I found the solution.

In loading I pre-calculate my results also by joining more tables.

If the result value is zero (even if other fields are not zero) I put variable 'vZeroValue'=0 otherwise is 1.

In UI I put a button Show/Hide zero value that select 0 or 1 from hidden field vZeroValue.

View solution in original post

6 Replies
sunny_talwar

You mean even if Exp1 (not Exp2) has value? Try using a button to set a variable 0 or 1 and use this for your 1st expression:

If(vVar = 1, Expression,

If(Expression2Label > 0, Expression))

Expression is a placeholder here and needs to be replaced by your actual expression1

tresesco
MVP
MVP

PFA

clovati
Partner - Creator
Partner - Creator
Author

Hy Sunny!

I have to put every value (I have lots of expressions, not only 2)  like (false) zero and then in my table I have to check 'SUPPRESS ZERO-VALUE'? thanks!

sunny_talwar

You are right. There might be another way using a calculated dimension, but will have to look at your application before I can recommend the alternative

clovati
Partner - Creator
Partner - Creator
Author

Hi Sunny! I think it is not possible in  my case.... the value zero that leads hiding all the rows is calculated by other measures, then I think it is recursive. thanks!Capture.PNG

clovati
Partner - Creator
Partner - Creator
Author

I found the solution.

In loading I pre-calculate my results also by joining more tables.

If the result value is zero (even if other fields are not zero) I put variable 'vZeroValue'=0 otherwise is 1.

In UI I put a button Show/Hide zero value that select 0 or 1 from hidden field vZeroValue.