Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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

17 Replies
Not applicable
Author

Thanks Sovan. Could you please help me understand the expression.

Gysbert_Wassenaar

{<Brand=,Market=p(Market)>} selects only those records where the market is the same as the market of the selected brands.

Market = p(Market) will include only the market(s) of the selected brand(s). In other words the Possible values of Market given the selections you made.

Brand= will make sure that Brand will not be filtered so all brands of the market of the selected market will be included.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks a lot. but i was wondering, since brand is a filter we are selecting, cant we write <brand={"$(=Brand)"}> so that it takes the associated market value for the only brand we select?

Gysbert_Wassenaar

No, because you want all the brands with the same market. If you fix the value of brand to the selected brand you get ... only the selected brand.


talk is cheap, supply exceeds demand
Not applicable
Author

Hello Gysbert,

If I include one more dimension'Country', is it  possible to calculate Market Value in that case?

                              

BrandCountryBrand ValueMarket Value
WC01China4001200
WC01India2001000
WC01Germany3001400

Is the expression : sum({<Brand=,Market=p(Market), Country=p(Country)>} Value) correct?

Gysbert_Wassenaar

What are you trying to calculate? The market share over all countries or the market share per country?

BTW, you could first simply test an expression before asking if it is correct. That is part of your job as a qlikview developer. You are ultimately the person responsible for making sure that expressions return correct results so that end users can rely on the information in the qlikview documents they use.


talk is cheap, supply exceeds demand
Not applicable
Author

Hello I m trying something complex , like calculating market share (brand value and market value) at country level

your expression gives me market value same for all countries, i want to break it at country level

MarketBrandCountryValue
WildcraftWC01China4001200
WildcraftWC01China2001000Brand valuewc01900
WildcraftWC01Germany3001400Market valuewildcraft1300
WildcraftWC02China2003000
WildcraftWC02India2003000

At Country level

Brand Valuechina600
germany300
Market value
china800
germany300

On selection of only Brand, To calculate the marketvalue countrywise, i wrote expression

sum({<brand=,MARKET=p(MARKET),COUNTRY=p(COUNTRY)>} VALUES)

which gave me incorrect values 1900 for all countries

                          

EXPECTED
BrandCountryMarket Value countrywise
WC01China1900800
WC01China1900800
WC01Germany1900300
Gysbert_Wassenaar

Perhaps attached qvw helps.


talk is cheap, supply exceeds demand