Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

conditional expressions (hide/show)

question.png

14 Replies
sunny_talwar

May be try this:

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

sunny_talwar

or this:

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

Not applicable
Author

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

sunny_talwar

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

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

Not applicable
Author

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

sunny_talwar

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
Author

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. 

sunny_talwar

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
Author

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