Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
dberkesacn
Partner - Creator III
Partner - Creator III

Set Analysis

Hi Community,

how can I create a set analysis where I have to filter for a  specif value and also make the calculation independent from that field, where the value is presented.

Example:

sum({$<country={'Hungary'}>}VALUE)

if a user selects for ex country = India it should not show 0 but still the value from Hungary.

Important point the calculation should respond the other field selection so 1 as set Identifier can not be used.

Best,

Dan

 

Labels (2)
1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master

The expression does what it shoud do:

clipboard_image_0.png

AT is selected, CH is in expression, value for CH is shown.

But be aware that you use the same field (eg. not Year in expression and MonthYear in selection)

Regards

View solution in original post

4 Replies
kashyap311996101
Partner - Specialist
Partner - Specialist

Hi

Try using this 

if(GetSelectedCount(country) =0,sum({$<[country]={'Hungary'}>}VALUE),if(sum(VALUE)>0,sum(VALUE),sum({$<[country]={'Hungary'}>}VALUE))) 

Hope it helps 

Thanks

Thanks and Regards
Kashyap.R
tomovangel
Partner - Specialist
Partner - Specialist

Hi, Dan, this is rather interesting case.

 

Can you try with this:

 

sum({$<country=, country={'Hungary'}>}VALUE)

martinpohl
Partner - Master
Partner - Master

The expression does what it shoud do:

clipboard_image_0.png

AT is selected, CH is in expression, value for CH is shown.

But be aware that you use the same field (eg. not Year in expression and MonthYear in selection)

Regards

dberkesacn
Partner - Creator III
Partner - Creator III
Author

Dont know what happened but ye. 

After F5 it is behaving correctly same.