Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I need help on doin sum for below situation
1. Need to do Sum of "Total Cost", which is measured value saved in Master Item (Unit Price x Qty)
2. Condition If Column "Cost Type" = CS1, CS3, CS4, CS6,CS8,CS10 then do sum of Total Cost
3. I want to show this in KPI
I am trying by expression
if(([Cost Type]='CS1','CS3','CS4,'CS6','CS8','CS10'),[Total Cost] ,Null) BUT getting error.
Please assist if anyone know
You can use Set Analysis to solve this, like so:
sum({< [Cost Type]={'CS1','CS3','CS4,'CS6','CS8','CS10'} >} [Total Cost])
You can read more about set analysis here:
Let me know if it helps.
-Zapparoli
Check my Youtube Channel for more Qlik Content
https://www.youtube.com/@ZappaAnalytics
Hello @Zapparoli ,
Thanks for the revert
I tried with your suggestion but didn`t work, the catch is Total cost. I tried to reflect Master item in KPI individually to see overall amount but it is showing me zero.
I think the 2 columns Qty and UP has to do something. I am completely confused at this point.
Hey @harjotsingh16
Sorry about that, I did not see you had two fields.
In this case, can you try calculating the Total Cost field into the script ?
Like so:
[Unit Price] * Qty as Total Cost
Then you can use the formula I provided you before.
-Zapparoli
Check my Youtube Channel for more Qlik Content
https://www.youtube.com/@ZappaAnalytics