Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
New Contributor

KPI: Percent of higher dimension

Hi all,

I'm struggling with a KPI calculation.

The data I have looks like this: 

DateBasketProductModelArticle_numberUnits_sold
Okt 2019ACarSUV12345
Nov 2019BCarSUV123510
Okt 2019ACarrace12362
Nov 2019ACarrace12367
Okt 2019Bbikemountain123834
Okt 2019Abikeroad123920

 

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

1 Solution

Accepted Solutions
Highlighted

Re: KPI: Percent of higher dimension

May be this

Sum(Units_Sold)/Sum({<Basket, Model, Product = p(Product)>}Units_Sold)

View solution in original post

3 Replies
Highlighted
Valued Contributor III

Re: KPI: Percent of higher dimension

you need to have two 

 

Sum(Units_sold)/sum ( {<Model= >} Units_sold)

Channa
Highlighted
Partner
Partner

Re: KPI: Percent of higher dimension

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)

 

 

Highlighted

Re: KPI: Percent of higher dimension

May be this

Sum(Units_Sold)/Sum({<Basket, Model, Product = p(Product)>}Units_Sold)

View solution in original post