Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Simple set analysis query..

Hello Experts,

I am having a simple Set Analysis expression query. It feels like I have done this before, but unable to do it now..I am trying to get the data for the maximum available month and tried the below expressions, none of this work. I have data till May in this case and June data comes in July... can anyone help with this?

if   (sum({<month = month(today())>}reportValue)<>0, 

num(sum({<month = 'max(=month)'>}reportValue), $(vNumberForm)),'')

By default I want my chart to show the maximum available data and change only when we select other dates.....

Thanks in Advance,

Mady

14 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

but this is my expression doing, maybe you have to change the true- and false-value.

Not applicable
Author

Martina, The number seen in the screenshot is for the whole years. If i select May 2011, the number should be 1,142,223 only... this is showing it as 18 million which is wrong and its because I am not selecting any date in the above screenshot... can i get only May 2011 data by default...its defaulting to all years data and your expression  below to get the max month (May) data by default doesnt work

If(GetSelectedCount(month)=1,

num(sum({<month = {"$(=max(month))"}>} reportValue), $(vNumberForm)),

num(sum({<month = {"$(=Only(month(today())))"}>} reportValue), $(vNumberForm)))

Appreciate your help again, any more suggestions?

Thanks

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

pardon, I meant something like this:

If(GetSelectedCount(month)=1,

num(sum({<month = {"$(=Only(month))"}>} reportValue), $(vNumberForm)),

num(sum({<month = {"$(=Max(month))"}>} reportValue), $(vNumberForm)))

Not applicable
Author

Hello Martina,

I appreciate your time and effort in trying to help me with this situation. I figured out a way for this issue and I am hiding columns in Pivot and using multiple expressions, which solved my problem.


Thanks for all the help,

Mady

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Mady,

not at all and greetings from Munich