Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
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 (2)
1 Solution

Accepted Solutions
sunny_talwar

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

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