Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!!!
Not sure what you are after, but try this:
Sum({<BRAND, MOLECULE, LAB>} [1])/Sum(TOTAL <Market> {<BRAND, MOLECULE, LAB>} [1])
Not sure what you are after, but try this:
Sum({<BRAND, MOLECULE, LAB>} [1])/Sum(TOTAL <Market> {<BRAND, MOLECULE, LAB>} [1])