Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Tags (1)
1 Solution

Accepted Solutions
atkinsow
Valued Contributor II

Re: Hide/Show Expression Columns using Conditional

Haven't tested this but you can try


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

10 Replies
atkinsow
Valued Contributor II

Re: Hide/Show Expression Columns using Conditional

in your conditional show expression try

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

alexandergrando
New Contributor III

Re: Hide/Show Expression Columns using Conditional

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

Highlighted
atkinsow
Valued Contributor II

Re: Hide/Show Expression Columns using Conditional

Sorry,.  Should be

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

alexandergrando
New Contributor III

Re: Hide/Show Expression Columns using Conditional

Thank you!

alexandergrando
New Contributor III

Re: Hide/Show Expression Columns using Conditional

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

atkinsow
Valued Contributor II

Re: Hide/Show Expression Columns using Conditional

Can you share a sample app?

alexandergrando
New Contributor III

Re: Hide/Show Expression Columns using Conditional

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?

atkinsow
Valued Contributor II

Re: Hide/Show Expression Columns using Conditional

Haven't tested this but you can try


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

alexandergrando
New Contributor III

Re: Hide/Show Expression Columns using Conditional

Great! Thanks for bearing with me.