Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculation in pivot based on the level of detail

Hello all, I have the next problem.

I have a pivot with market shares. I have three dims in that pivot. Channel, Category and brand. And one expression called marketshare(in numbers);

This expression looks like this;

Sum({<Manufacturer={WE}>}[NumbersSold]) / Sum([NumbersSold])

When i'm working with this pivot I get the next

error loading image

This is going fine but now I'm going to show the brands and their the values are 100% for brands that are from 'WE' and 0% for brands that are not fom 'WE'. What I want to see there is the share of the brand in the category. Is this possible in QV? I'm stuck her so anyone can give me a hand? Thanks in advance

1 Solution

Accepted Solutions
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

the percentage is to be calcutalted by the entered dimension:

Sum({<Manufacturer={WE}>}[NumbersSold]) / Sum(Total <Dimension1, Dimension2,....>[NumbersSold])

Sum({<Manufacturer={WE}>}[NumbersSold]) / Sum(Total <Channel> [NumbersSold])

Sum({<Manufacturer={WE}>}[NumbersSold]) / Sum(Total <Channel, Category> [NumbersSold])

and so on

View solution in original post

3 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

the percentage is to be calcutalted by the entered dimension:

Sum({<Manufacturer={WE}>}[NumbersSold]) / Sum(Total <Dimension1, Dimension2,....>[NumbersSold])

Sum({<Manufacturer={WE}>}[NumbersSold]) / Sum(Total <Channel> [NumbersSold])

Sum({<Manufacturer={WE}>}[NumbersSold]) / Sum(Total <Channel, Category> [NumbersSold])

and so on

Not applicable
Author

This isn't working when I do this i get odd figures

Not applicable
Author

It is working!! Sorry for the first reply, Thnx!