Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Market Share not taking into account Column Filters in Pivot

Hi,

So I have a dataset with the following dimensions:

MARKET; BRAND; LAB; MOLECULE; SALES TYPE (UNITS OR LOCAL CURRENCY); PERIOD

and the following measures: 1; 2 (based on the sales value for period1 and previous period (2))

I created a Pivot Table in Qlik Sense with the following parameters:

Rows: BRAND

Columns: SALES TYPE; PERIOD; MEASURES

Measures: Sum([1]), MS%1

MS%1 (Market Share in period1) is calculated the following way:

aggr(NODISTINCT {<BRAND, MOLECULE, LAB>} sum([1]),BRAND)/aggr(NODISTINCT {<BRAND, MOLECULE, LAB>} sum([1]),MARKET)

I cant get the MS%1 variable to take into account the dimensionality of the COLUMNS (sales type and period) and instead it takes into account the sum of all the SALES TYPES and PERIODS. However, the other measure, Sum([1]) does take into account the dimensionality of the COLUMNS.

Could you please help me to decipher how do I need to adjust the formula in MS%1 so as to solve the problem?

Thanks a lot!!!

1 Solution

Accepted Solutions
sunny_talwar

Not sure what you are after, but try this:

Sum({<BRAND, MOLECULE, LAB>} [1])/Sum(TOTAL <Market> {<BRAND, MOLECULE, LAB>} [1])

View solution in original post

1 Reply
sunny_talwar

Not sure what you are after, but try this:

Sum({<BRAND, MOLECULE, LAB>} [1])/Sum(TOTAL <Market> {<BRAND, MOLECULE, LAB>} [1])