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
How is it possible that denominator i.e count(TransID) has negative values?
Try to close Qlik Community Tip: Marking Replies as Correct or Helpful.
Not sure i followed in you. Will you mock something..
Hi,
This is sample logic.
Lets say
Logic:
(Sum(sales)/count(parts))*1000000
Thanks..
Can you post some sample data?
Because might be i'm not getting your point. What i'm thinking is if you are counting Parts it will be 1,2,3... etc not in negative.
May be these?
1) If((Sum({<Sales = {"=Sum(Sales)>0"}>} Sales)/Count({<TransID = {"=Count(TransID) = 0"}>}TransID)),(Sum(Sales)/Count(TransID))*100000)
2) If((Sum({<Sales = {"=Sum(Sales)=0"}>} Sales)/Count({<TransID = {"=Count(TransID)=0"}>} TransID)), 0)
3) If((Sum({<Sales = {"=Sum(Sales)=0"}>} Sales)/Count({<TransID = {"=Count(TransID)<=0"}>} TransID)), 0)
4) If((Sum({<Sales = {"=Sum(Sales)>0"}>} Sales)/Count({<TransID = {"=Count(TransID)<=0"}>} TransID)), (Sum(Sales)/Count(TransID))*1000000)
To handle your first two rules:
=Alt(Sum(Sales) / Count(TransID) * 1E5, If(Sum(Sales) = 0, 0, 1E6))
Dividing by zero would trigger the second part of the Alt().
The last two rules could never happen as Count() cannot produce a negative value.
Hi,
Please find the attached sample data set.
Thanks..
Please find the attached file as per data you have provided.
But here as per logic provided in sample data, Condition 1,2,and 3 will be always 0 because for condition 1 denominator is 0 and condition 2 & 3 rate is 0.
Please provide logic.
I don't have access to open external Apps.
Thanks..