Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
tduarte
Partner - Creator II
Partner - Creator II

Set analysis problem

Hi all,

I'm trying to convert expressions on a dashboard to use Set Analysis instead of IF to see if there are any performance improvements.

The tables on the dashboard tab need to be "static", meaning you cannot make any selections and these tables are not affected by selections on other tabs.

So far I've set the tables to read only and I also have a macro that detaches the tables as soon as a tab is selected. I don't find this very practical so I wanted to have a go with Set Analysis.

Current IF expression:

sum(if(week_start=var_current_max_week AND _Market = 'My Sales', Revenue))

- working fine

New Set Analysis expression:

sum({1<week_start={'$(var_current_max_week)'}, _Market={'My Sales'}>} Revenue)

- I can't get this one to work... it's returning much higher values and it doesn't seem to be applying the set analysis on these fields.

What am I doing wrong?

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

   Try  this.

  sum({1<week_start={'$(#var_current_max_week)'}, _Market={'My Sales'}>} Revenue)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
tduarte
Partner - Creator II
Partner - Creator II
Author

Hi Kaushik,

I have tried that before. It's not that, the dates are in the same format.

Something is weird because if I remove the 1 from set analysis it gives the correct result.

Problem is,it will be affected by selections on other fields.

Regards,

Telmo Duarte

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

   I dont know will this work according to your requirement or not but try this.

    sum({<week_start={'$(#var_current_max_week)'}, _Market={'My Sales'}>} total Revenue)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!