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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF expression with z-analysis

Hi all,

I'm trying to develop an if expression including z-analysis.

I have three fields in "Club" that I want to conditionally show. When Month=jan, feb, march and april

I want to exclude business case 2 and business case 3. When Month=May, Jun,July and august I want to exclude Business case 1 and business case 2. When Month=Sep, Oct, Nov and December I want to exclude business case 1 and 2.

I have made the below expression that is not working, not sure why.

sum(if(Month='jan',Sum({$<Measure={'Month Development Members'}, Club-={'Business Case 1'} >}))Value)

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try something like:

sum( {<Month={'jan','feb','mar','apr'},Club-={'BC2','BC3'}> + <Month={'may','jun','jul','aug'},Club-={'BC1','BC2'}> + <Month={'sep','oct','nov','dec'},Club-={'BC1','BC3'}>}  Value)


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
preminqlik
Specialist II
Specialist II

if(Month='Jan' or Month='Feb' or Month='Mar' or  Month='Apr' ,Sum({$<Measure={'Month Development Members'}, Club={"*"}-{'Business Case 2','Business Case 3'} >}Value),Sum({$<Measure={'Month Development Members'}, Club={"*"}-{'Business Case 1','Business Case 2'} >}Value))



once see your last statement for months sep ,oct,nov as same as may jun,july .....change according to that data



regards

premhas

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try something like:

sum( {<Month={'jan','feb','mar','apr'},Club-={'BC2','BC3'}> + <Month={'may','jun','jul','aug'},Club-={'BC1','BC2'}> + <Month={'sep','oct','nov','dec'},Club-={'BC1','BC3'}>}  Value)


talk is cheap, supply exceeds demand
preminqlik
Specialist II
Specialist II

hey gysbert ...got something new from you...i'll try this  ...thanks man ...