Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We have a logic in qlikiew
Logic:
Sales rate: (Sum(Sales)/Count(TransID))*100000
Formula Rules:
What would the qlikview logic followed with the above rules
1. If(Sum(Notifications)>0 and sum([Item Movement])=0, (Sum(Notifications)/sum([Item Movement]))*100000)
2.If(Sum( Notifications)=0 and sum([Item Movement])=0, (Sum(Notifications)/sum([Item Movement]))*0)
3.If(Sum( Notifications)=0 and sum([Item Movement])<0, (Sum(Notifications)/sum([Item Movement]))*0)
4.If(Sum( Notifications)>0 and sum([Item Movement])<0, (Sum(Notifications)/sum([Item Movement]))*1000000)
Hi,
Thanks for the try.
I belive its not what i required.
Kindly find the below set of rules.
| 1. If the numerator is greater than zero, but the denominator is zero, then the Sales rate is set to 1,000,000. |
| 2. If the numerator and denominator are both zero, then the Sales rate is zero. |
| 3. If the denominator is negative and the numerator is 0, then the Sales rate is set to 0. |
| 4. If the denominator is negative and the numerator is greater than zero, then the Sales rate is set to 1,000,000. |
Thanks..
Hi All,
I belive got the answer.
if(sum(Notifications)>0 and sum([Item Movement])=0,1000000,
if(sum(Notifications)=0 and sum([Item Movement])=0,0,
if(sum(Notifications)=0 and sum([Item Movement])<0,0,
if(sum(Notifications)>0 and sum([Item Movement])<0,1000000,
(sum(Notifications)/sum([Item Movement])*1000000)))))
Is there any way to get same results with out using 'IF' condition.
I would be really great..![]()
Thanks..
Hi,
Any other approach.
Thanks..
You can do this by calculating this logic to script level.