Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rakesh_kumar
Creator
Creator

Help with conditional show/hide of columns in a straight table

Hi Guys,


My requirement is to show/hide a metric column in a straight table. I wanted to hide the column if there are no values in it, otherwise show it. The column expression is:

=if(Purchase_Date - Enquiry_Date= 12, Sum( Amount), 0)


So I am trying to use the following conditional expression to show/hide that column:

=if( sum({<Purchase_Date - Enquiry_Date= {12}>} Amount) > 0, 1, 0)


But its not working, may be the problem with set analysis expression. Please could someone help how to resolve this problem, if there is a workaround without requiring to use set analysis expression thats also fine?


Thanks,

RK

1 Solution

Accepted Solutions
sunny_talwar

Try this:

=Sum(If(Purchase_Date - Enquiry_Date = 12, Amount)) > 0

View solution in original post

4 Replies
sunny_talwar

Try this:

=Sum(If(Purchase_Date - Enquiry_Date = 12, Amount)) > 0

rakesh_kumar
Creator
Creator
Author

Thanks Sunny, it worked.

Just out of curiosity, is there anything wrong with this expression, just wondering why its not working:

sum({<Purchase_Date - Enquiry_Date= {12}>} Amount)



sunny_talwar

You can only have field names in the LHS of your set modifier, not allowed to do calculations of any sorts

Sum({<Purchase_Date - Enquiry_Date = {12}>} Amount)

rakesh_kumar
Creator
Creator
Author

Thanks Sunny