Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
MyMagic
Contributor II
Contributor II

By Manufacturer Market Share in a specified Segment

Hi,

I have a total market that is divided into 2 segments: Segment A and Segment B. Now I want to show the development of market shares of the manufacturers in Segment A in a line Chart like below:

Market Share Line Charts.PNG

In Qlik Sense, I have made a line chart with the Dimensions:Time Period, Manufacturer, Measures:

=sum({$<Segmentation={'A'}>} ConvertedUnit)/sum({$<Segmentation={'A'}>*1<Manufacturer=>} ConvertedUnit)

But it doesn't work. It gives me 100% share for each manufacturer because it is dividing it by itself when what I want to happen is:

(Manufacturer 1 Converted Units in Segment A)/(Total Converted Units in Segment A)

I also tried using the Total function but it includes  the converted units in Segment B.

Thanks for your help!

Myka

1 Solution

Accepted Solutions
ogautier62
Specialist II
Specialist II

Hi,

maybe add total in sum :

sum({$<Segmentation={'A'}>} ConvertedUnit)/sum(total {$<Segmentation={'A'}>*1<Manufacturer=>} ConvertedUnit)

regards

View solution in original post

2 Replies
ogautier62
Specialist II
Specialist II

Hi,

maybe add total in sum :

sum({$<Segmentation={'A'}>} ConvertedUnit)/sum(total {$<Segmentation={'A'}>*1<Manufacturer=>} ConvertedUnit)

regards

MyMagic
Contributor II
Contributor II
Author

Thanks Oliver, that's what I ended up doing as well. I realized that I was putting the TOTAL in the wrong position