Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
BIDev
Creator
Creator

Multiple If's in qlik

How Can I put the below If statement in a Qlik way ?

if(sum({<Year={'2019/P09'}>}[Area])<=0,
    sum({<Year={'2019/P08'}>}[Area]),

if(sum({<Year={'2019/P08'}>}[Area])<=0,
    sum({<Year={'2019/P07'}>}[Area]),

if(sum({<Year={'2019/P07'}>}[Area])<=0,
    sum({<Year={'2019/P06'}>}[Area]))

)))

 

Thank you much.

Labels (4)
2 Replies
JordyWegman
Partner
Partner

Hi Supritha,

I assume that you are talking about periods in your (financial) year. What do you want to achieve with this formula? For you are saying that when P9s Area is smaller/equal to 0, then take P8 else do the same for P8/P7. But what if your second statement is true? What does that mean?

Jordy
Climber

Work smarter, not harder
BIDev
Creator
Creator
Author

Hi - I am trying to get value for FUTURE periodS

Ex: I have 5 periods p5,p6,p7,P8,P9

Ex: if ID 1 has value FOR P5, then It will assign the same value for p5,p6,P7,P8,P9

if ID 2 has value FOR p6, then It will assign P6 value for p6,P7,P8,P9 (P5 will show 0)

if ID 32 has value FOR p7, then It will assign P76 value for P7,P8,P9 (P5 and p6 will show 0)