Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
caezano
Contributor
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

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

May be this

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

View solution in original post

3 Replies
Channa
Specialist III
Specialist III

you need to have two 

 

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

Channa
dplr-rn
Partner - Master III
Partner - Master III

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)

 

 

sunny_talwar

May be this

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