Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Market Share Calculation using Set Analysis

Hello All,

I am trying to calculate sum(sales) of current brand selection and divide it by sum(Sales) for the associated market.

Not sure how to calculate overall sales for a specific market as only Brand is selected( market is not selected) .

i am trying to calculate it as sum(Sales)/ sum(total<Market>sales) where denominator gives me total market value whereas i need to calculate it only for associated market value for the brand selected

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try: sum(Value) / sum({<Brand=,Market=p(Market)>} Value)


talk is cheap, supply exceeds demand

View solution in original post

17 Replies
agomes1971
Specialist II
Specialist II

Hi,

please see attached

HTH

André Gomes

Not applicable
Author

Sorry, but i use the personal edition

agomes1971
Specialist II
Specialist II

Hi,

so how do you want me to help you?

Regards

André Gomes

rubenmarin

Hi, can you try if this expression can work for you?:

sum(Value)/sum(total<Market> {<Brand>} Value)

This can work on a table with Brand as dimension, so that dimension filters the market.

Yyu can test in the straight table, for a row with Brand it will be correct, but the total row will sum all the brands in all the the markets, this is because there is no brand filtering.

Not applicable
Author

Hello Ruben,

the expression doesnt work. on selection of year , month and Brand (IN01). i want to calculate sum(sales) for IN01 / sum(sales) for Indigo Market only.

your expression gives me the value for all markets. I want to calculate for the associated market for IN01 only

Not applicable
Author

Hi Andre,

I have tried several expressions, but couldnt get through. Just need a suggestion on how do i write the  expression for associated value which isnt selected? I want to select only Brand and not market. Just the market associated to the brand should be calculated as sum(sales) for that market.

Not applicable
Author

Hi Adity,

Try this expression :

sum(TOTAL {$<Market = P({1<Brand={'$(=GetFieldSelections(Brand))'}>}),Brand>} Value )

thanks

Sovan

Gysbert_Wassenaar

Try: sum(Value) / sum({<Brand=,Market=p(Market)>} Value)


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks a lot. It worked. could you please explain me the expression.