Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'm struggling with a KPI calculation.
The data I have looks like this:
Date | Basket | Product | Model | Article_number | Units_sold |
Okt 2019 | A | Car | SUV | 1234 | 5 |
Nov 2019 | B | Car | SUV | 1235 | 10 |
Okt 2019 | A | Car | race | 1236 | 2 |
Nov 2019 | A | Car | race | 1236 | 7 |
Okt 2019 | B | bike | mountain | 1238 | 34 |
Okt 2019 | A | bike | road | 1239 | 20 |
Now i usually select a Basket and a model. Each model is specific to a product. When I select a model I would like the KPI to show a percentage of how much the model (and selected basket) comprises of the whole product volume sold.
For example: I select on Basket "A" and model "SUV". I would like the KPI to show: 5 / (5+10+2+7) = 20,8%
Is there a way to formulate an equivalent set analysis for my KPI?
Thank you & best regards
May be this
Sum(Units_Sold)/Sum({<Basket, Model, Product = p(Product)>}Units_Sold)
you need to have two
Sum(Units_sold)/sum ( {<Model= >} Units_sold)
use total qualifier
Sum(total<Product>Units_sold) will give you sum rolled up to Product level
so use this below expression to get percentage
Sum(Units_sold)/Sum(total<Product>Units_sold)
May be this
Sum(Units_Sold)/Sum({<Basket, Model, Product = p(Product)>}Units_Sold)