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: 
Not applicable

multiple if condition Expression

Hello all,

I need your help to solve my problem :

my expression is : if(isnull(Budget),SUM(Budget_C)- SUM(Budget), SUM(Budget) - SUM(Budget_C))

i need to add a condition in this expression: when the difference SUM(Budget_C)- SUM(Budget) is less than 0.25, i put 0 else i let the value found of SUM(Budget_C)- SUM(Budget), and the same for the second difference

SUM(Budget) - SUM(Budget_C).


Thank you for your help!

Labels (1)
4 Replies
tamilarasu
Champion
Champion

Hi Sinhaam,


You can try,


if(isnull(Budget),if(Sum(Budget_C)- Sum(Budget)<0.25,0,Sum(Budget_C)-sum(Budget)), if(Sum(Budget) - Sum(Budget_C)<0.25,0,sum(Budget)-sum(Budget_C)))

Not tested. let me know..

sunny_talwar
MVP
MVP

So if Budget is null, Sum(Budget) should be 0. May be try this:

If(Len(Trim(Budget)) = 0,

If(Sum(Budget_C) < 0.25, 0, Sum(Budget_C)),

If((Sum(Budget) - Sum(Budget_C)) < 0.25, 0, (Sum(Budget) - Sum(Budget_C))))

tamilarasu
Champion
Champion

Yes Sunny. I too thought the same.. but i dont know what he is trying to do.. Let us wait for the reply..

Not applicable
Author

it's works, thank you for your help !