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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
marcus_steggall
Creator
Creator

Multiple IF statement, with Set Analysis

Hi team,

If I was producing a calculation in line one below, that works perfectly when selecting 2017.

Say I wanted to add a second line into the calculation, based on another year how would this work?

This one below, doesn't work for me

=SUM({<Year_YYYY={'$(vMaxYear)'},Period_P=,Period_Start={"<=$(vMaxDate)"}>} if(Year_YYYY='2017' ,Revenue*1.09))
OR
SUM({<Year_YYYY={'$(vMaxYear)'},Period_P=,Period_Start={"<=$(vMaxDate)"}>} if(Year_YYYY='2018' ,Revenue*1.07))

Cheers for your advice

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

May be try this

=Sum({<Year_YYYY={'$(vMaxYear)'}, Period_P, Period_Start = {"<=$(vMaxDate)"}>}
Revenue *
Pick(Match(Year_YYYY, '2017', '2018') , 1.09, 1.07)
)

View solution in original post

2 Replies
sunny_talwar
MVP
MVP

May be try this

=Sum({<Year_YYYY={'$(vMaxYear)'}, Period_P, Period_Start = {"<=$(vMaxDate)"}>}
Revenue *
Pick(Match(Year_YYYY, '2017', '2018') , 1.09, 1.07)
)
marcus_steggall
Creator
Creator
Author

ahh genious, I like that way

very helpful Sunny, appreciate your help

have a great weekend