Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mk95
Partner - Contributor II
Partner - Contributor II

wanna use an expression value in set analysis

 Hi everyone,

I use an expression in a bar chart (as in the example) in the file in which I want to use it, I cannot set any flags. Now I want to do a summation using Set Analysis, but I need the expression. But I don't get the correct values ​​and the message "bad file name (s)". Can someone help me?

 

pic for test.PNG

3 Replies
MayilVahanan

HI @mk95 

Try like below

if(expression=40 AND Color='red', Sum(test1))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
mk95
Partner - Contributor II
Partner - Contributor II
Author

yes it works, ty! 

Can you explain me, why I can't use the set expression? 

MayilVahanan

Hi @mk95 

basket:
load *, Basket&'-'&Color as Key inline [
Basket, Color, test1, test2
Basket 1, yellow, 10, 10
Basket 1, red, 20, 20
Basket 1, white, 30, 30
Basket 2, yellow, 20, 20
Basket 2, red, 10, 10
Basket 2, white, 20, 20
Basket 3, yellow ,30, 30
Basket 3, red ,20, 20
Basket 3,white, 40, 40];

for set analysis, try like below

exp: sum({< Color={'red'}, Key={"=Sum(test1+test2)=40"}>}test1)

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.