Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am new to Qlik Sense and I want to make a dashboard of products that have a margin that's equal to or above 40%.
I have a simple KPI that counts all the products but I want it to only count the products that have a margin equal to or above 40%... I have been trying multiple times and days with all kinds of formula's but they won't work. Can someone help me out? Thanks in advance!
Hi, You can try with:
count(Distinct {<[ProductIdField]={"=Margin%Expression>0.4"}>} [ProductIdField])
Change Margin%Expression with expression to calculate the margin%
Hi,
Thanks for your reply. Unfortunately it still does not work 😞
Hi, with this data:
LOAD * Inline [
ProductId, Sales, Cost
1,105,40
2,65,40
];
If the expression to calculate margin is (Sum(Sales)-Sum(Cost))/Sum(Cost)
This expession works: count(Distinct {<[ProductId]={"=(Sum(Sales)-Sum(Cost))/Sum(Cost)>0.4"}>} [ProductId])
If doesn't works for you, you need to provide more info of what you have, what are you trying and what exactly doesn't works, better if you can upload a sample app to make tests.