Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm stuck on a formula for 2 seperate KPI's.
I am trying to find the min Produced (column C) out of all Parts (column B) if the Product (column A) is equal to GGF and GGM respectively.
Basically I'm trying to create the 2 KPI's in blue above.
Not sure where I'm going wrong but can't seem to get it to work. Managed to get the max value with:
max(total <Product> aggr(sum([Produced]),Product='GGF',Part))
that would spit out 88 but if I change it from max to min it would give me 0
if you can help please let me know 🙂
If you want a KPI showing a value for a specific Product, you can try
Min({<Product={'FARM'}>} Aggr(If(Sum([Qty.])>0,Sum([Qty.])), Product, Part))
Why it shows 1 for 'MASTER', I don't know.
If you get 0 when you use Min(), it probably means that you have parts where Sum(Produced) is 0.
Try creating a table with only one dimension - Product - and use the following as measure
Min(Aggr(If(Sum(Produced)>0,Sum(Produced)), Product, Part))
Thank you for taking the time!
Sorry but I am not sure what you mean by 'Try creating a table with only one dimension'. I am trying to create a standalone KPI, not a table. Or do you mean uploading/creating a separate table in my data? (Sorry I'm still very new to all this..)
I will share my actual qlik sense images. Names are a little different but it's the same idea.
I tried inputting your formula. It works when I filter for 'FARM' and displays 41. But it does not work when filtering for 'MASTER'. It still displays 1 , when it should show 2.
But also, I don't want to have to filter to see each number. I would want the KPI to stand alone and have the filter in the formula so I can have them both next to each other.
Any idea if that's possible?
If you want a KPI showing a value for a specific Product, you can try
Min({<Product={'FARM'}>} Aggr(If(Sum([Qty.])>0,Sum([Qty.])), Product, Part))
Why it shows 1 for 'MASTER', I don't know.
Ended up finding the error in my data. Cleaned it up and the formula you provided worked perfectly.
Thank you! Really appreciate your help