Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
alexandergrando
Contributor III
Contributor III

Hide/Show Expression Columns using Conditional

Hello,

I have the following expression used in a straight table:

=If(EndDateOfOperation > Today(), If(Region = 'MISSING', 'Yes'))

I would like to hide the column that shows this expression if no expression results are 'Yes'. But I can't figure it out. Can anyone please help? Thanks.

Message was edited by: Alexander Grando

1 Solution

Accepted Solutions
Anonymous
Not applicable

Haven't tested this but you can try


count(distinct {<EndDateOfOperation={'>$(=today())'}>}, NPRegion={'MISSING'}>}NPRegion)>0

View solution in original post

10 Replies
Anonymous
Not applicable

in your conditional show expression try

count(distinct {NPRegion={'MISSING'}>}NPRegion)>0

alexandergrando
Contributor III
Contributor III
Author

Hi Wallo,

It appears that there is an error in your conditional expression according to QlikView. Please see attached screenshot. Also, the expression is not hiding a column that I know does not have any 'Yes' values.

Capture.PNG

Anonymous
Not applicable

Sorry,.  Should be

count(distinct {<NPRegion={'MISSING'}>}NPRegion)>0

alexandergrando
Contributor III
Contributor III
Author

Thank you!

alexandergrando
Contributor III
Contributor III
Author

Hi Wallo,

Upon closer examination, it looks like your expression is evaluating all rows in the app. But I need it just to evaluate those that are used in my straight table. Otherwise, I have expression columns showing up in my straight table that are blank. Is there any way to redo the conditional formula so that it only evaluates whether the result of the expression is 'Yes'?

Anonymous
Not applicable

Can you share a sample app?

alexandergrando
Contributor III
Contributor III
Author

It will take me a bit of time to put one together due to privacy issues. Also, I forgot to mention that I altered my expression to:

=If(EndDateOfOperation > Today(), If(Region = 'MISSING', 'Yes'))

The problem with your conditional formula is that it is counting regions that have an EndDateOfOperation on any day. I need it to be restricted to where the EndDateOfOperation is greater than today.

Does that help at all?

Anonymous
Not applicable

Haven't tested this but you can try


count(distinct {<EndDateOfOperation={'>$(=today())'}>}, NPRegion={'MISSING'}>}NPRegion)>0

alexandergrando
Contributor III
Contributor III
Author

Great! Thanks for bearing with me.