Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statement and set analysis togather

Can we use If statement and Set analysis togather???

1 Solution

Accepted Solutions
SunilChauhan
Champion
Champion

yes you can see the example application

see the attached file

see expression of bar charts

hope this helps

Sunil Chauhan

View solution in original post

16 Replies
swuehl
MVP
MVP

Yes, you can and there are scenarios where this is a usual setting.

edit: I assumed you mean using if() and set analysis within an aggregation function...

SunilChauhan
Champion
Champion

yea we can like below

sum({<Year={'2010'}>}  if(Month='Jan' ,Sales))

hope this helps

Sunil Chauhan
Not applicable
Author

please can you give me any example on that ehere therre is a combination of if and set analysis......its very imp to know me.....

Not applicable
Author

hi sunil

are you sure the expression you used is correct???

Not applicable
Author

please  can you send me any type of sample application in which such type of condition is working???

SunilChauhan
Champion
Champion

yes you can see the example application

see the attached file

see expression of bar charts

hope this helps

Sunil Chauhan
Not applicable
Author

Thanks for sending me that sample.......

Not applicable
Author

Hi sunil,

In your example you successfully implemented set analysis with 1 if statement.... but is it possible to implement nested if condition in set analysis? I tried it in your example but it is not working .....can you give me some information on this???

yojas

SunilChauhan
Champion
Champion

yes we can do like below

sum(if(Year=2012,if(product='a',sale))

Sunil Chauhan