Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results 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

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

talk is cheap, supply exceeds demand
17 Replies
Specialist II

Hi,

HTH

André Gomes

Not applicable
Author

Sorry, but i use the personal edition

Specialist II

Hi,

Regards

André Gomes

MVP

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

Try this expression :

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

thanks

Sovan

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.

Community Browser