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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Vaithi
Contributor
Contributor

Nested If condition

Hello Everyone,

I have 2 columns, Fcst Issue and Volumes

Under Fcst Issue column it will be 2+10,1+11,0+12 and Budget 

If I select 2+10 in the filter pane, then I should get the value as 2+10 volumes - 1+11 volumes.

Similarly If I select 1+11 in the filter pane,  then I should get the value as 1+11 volumes - 0+12 volumes . I am getting only null value in the below formula. Can someone help me?

If([Fcst Issue]='2+10',(Sum({<[Fcst Issue] = {'2+10'}>} [Volumes]) - Sum({<[Fcst Issue] = {'1+11'}>} [Volumes])),
If([Fcst Issue]='1+11',(Sum({<[Fcst Issue] = {'1+11'}>} [Volumes]) - Sum({<[Fcst Issue] = {'0+12'}>} [Volumes])),
If([Fcst Issue]='0+12',(Sum({<[Fcst Issue] = {'0+12'}>} [Volumes]) - Sum({<[Fcst Issue] = {'Budget'}>} [Volumes])),
null())))

 

Labels (3)
1 Reply
Vaithi
Contributor
Contributor
Author

The formula is working fine now. Thanks