Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

conditional expressions (hide/show)

question.png

14 Replies

Re: conditional expressions (hide/show)

May be try this:

Only({<1>} [% Month Overall TD]) <= Max([% Month Overall TD])

Re: conditional expressions (hide/show)

or this:

Only({<1>} [% Month Overall TD]) = Max([% Month Overall TD]) or Only({<1>} [% Month Overall TD]) = (Max([% Month Overall TD]) - 1)

Not applicable

Re: conditional expressions (hide/show)

thank you for your quick responses Sunny T. I've tried all your suggestions and they don't work.

Re: conditional expressions (hide/show)

Sorry, I had a typo, can you try this:

Only({1} [% Month Overall TD]) <= Max([% Month Overall TD])

Not applicable

Re: conditional expressions (hide/show)

I just put in your new expression ' =Only({1} [%Month Overall TD]) <= Max([%Month Overall TD]) 'into a text box for testing purposes, and it is not evaluating it because it has an '-'.   However, when I use this expression '=Only({<1>} [%Month Overall TD]) = Max([%Month Overall TD]) ', it is evaluating it as a '-1'. 

Re: conditional expressions (hide/show)

I know what the problem is. You need to provide set analysis condition here:

Only({1<[% Month Overall TD] = {1}>} [% Month Overall TD]) <= Max([% Month Overall TD])

Replace 1 with whatever the value of Month is for the particular expression

Not applicable

Re: conditional expressions (hide/show)

the  field [%Month Overall TD]  is a numeric value.   For Nov 2013 it would be '1',  however, for Nov 2014 it would be '13'.   I apologize, but when you say replace the  1 with whatever the value of the Month, it would be different for every year because it would be 1 in Nov2013, but 13 in Nov2014. 

Re: conditional expressions (hide/show)

How about this:

Nov would show up for when Nov is selected and Dec is selected, right? Assuming Nov-2013 is a 1 and Nov-2014 is a 13, try this for Nov expression:

Nov

Mod([% Month Overall TD], 12) = 1 or Mod([% Month Overall TD], 12) = 2

Dec

Mod([% Month Overall TD], 12) = 2 or Mod([% Month Overall TD], 12) = 3

...

Not applicable

Re: conditional expressions (hide/show)

Hi Sunny:

I think we are getting close to the solution.   It looks like it work for Nov, Dec, and Jan when it is selected. However, when I select Feb, only Nov,  Jan, and Feb shows. If I select Mar, only Nov, Feb, and Mar shows. 

To be precise, when Nov-2013 is selected the %Month Overall TD is 61 and when Nov-2014 is selected it is 73, a change in 12(12 months).

Trung