Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
thibbos
Resolver I
Resolver I

Recalculating Market Share based on selection

Hi everyone, 

 

I have a technical question. I want to know how you would best assess this issue.

Context - Market Shares: Market Shares can be calculated in many ways. If we take below table as an example, our "business world" is comprised of two manufacturers (for which we get the data). Our company (Company A) is composed of two sales manager having each 5 area managers.

 

Sales ManagerArea ManagerManufacturer20192020
Sales Manager 1Area Manager 1Company A32926
Sales Manager 1Area Manager 1Company B924324
Sales Manager 1Area Manager 2Company A415328
Sales Manager 1Area Manager 2Company B369299
Sales Manager 1Area Manager 3Company A307551
Sales Manager 1Area Manager 3Company B813796
Sales Manager 1Area Manager 4Company A913425
Sales Manager 1Area Manager 4Company B846270
Sales Manager 1Area Manager 5Company A608192
Sales Manager 1Area Manager 5Company B996268
Sales Manager 2Area Manager 6Company A193783
Sales Manager 2Area Manager 6Company B144130
Sales Manager 2Area Manager 7Company A920704
Sales Manager 2Area Manager 7Company B6436
Sales Manager 2Area Manager 8Company A529846
Sales Manager 2Area Manager 8Company B75841
Sales Manager 2Area Manager 9Company A732629
Sales Manager 2Area Manager 9Company B757738
Sales Manager 2Area Manager 10Company A241863
Sales Manager 2Area Manager 10Company B231272

We can calculate many different Market Shares:

1. Company market Share NATIONAL LEVEL: which would give 48..8% for 2019 and 61.11% for 2020

 

Company A48,38%61,11%
Company B51,62%38,89%

2.a: If we now add the Sales Manager to the table (pivot) we will see the contribution  of each sales manager accross the National Market Share:

COMPANY ASales Manager 122,5%23,7%
COMPANY ASales Manager 225,9%37,4%
COMPANY ACOMPANY A TOTAL48,4%61,1%
COMPANY BSales Manager 139,1%19,2%
COMPANY BSales Manager 212,6%19,7%
COMPANY BCOMPANY B TOTAL51,6%38,9%

2.b: we can see the market share within each sales manager:

 

Sales Manager 1Company A36,6%23,7%
Sales Manager 1Company B63,4%19,2%
Sales Manager 1 Total 100,0%42,9%
Sales Manager 2Company A67,3%37,4%
Sales Manager 2Company B32,7%19,7%
Sales Manager 2 Total 100,0%57,1%

 

3a.3b the same can again be applied on area manager level where you can see contribution to national & sales manager level.  As well as the Market Share within the area manager level.

 

For this example we can thus calculate sevaeral market shares .... My question is the following:

- I want to achieve a dashboard style where based on slicers  (National - Sales Manager level - Area manager) choice (each being able to choose independetly)  create a ONE VIEW Dashboard with gauges
Capturebi.PNG

The view above is in Sales and works fine with all the slicers ... for market share I have many measures, but don't know how to make them appear dinamically based on three slicers selection.

 

Anyone a suggestion?

Thanks a lot

Thibault

1 ACCEPTED SOLUTION

HI @amitchandak 

 

I found just the right solution actually (I believe and checked).

Market Share (whatever the context is always calculated by doijg = sum of sales of a part / sum of sales of all parts.

We know that calculate(sum(sales)) will be (if we let him) influenced by the "slicers".

The question is thus how we make a measure that defines the ALL PARTS segment, as we want that all part to be dynamic based on selection. That's where it hit me:

 

USE ALLSELECTED on the table you allow the recalculation to be done. And it works ... The total of all parts is recalculated based on filter selection.

 

What's your opinion on this?

Thanks a bunch.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@thibbos , based on what I got, you can use measure slicer Approach.

 

measure slicer
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...

 

Isinscope, isfiltered and hasonevalue should help

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amitchandak,

 

I used the first link yesterday for something else. 

Basically, using inscope/hasonevalue/isfiltered/hasonefilter in combination of all the market share calculations would be your advice right?

 

Thanks a bunch. 

 

@thibbos , so basically it will be based on the filter choose to measure. typically for Guage, you should be done with isfiltered and hasonebvalue.

 

In the case of visual with group/axis/row, you have to use isinscope too.

 

My example of card - https://www.youtube.com/watch?v=hXg3kRFSGjA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

HI @amitchandak 

 

I found just the right solution actually (I believe and checked).

Market Share (whatever the context is always calculated by doijg = sum of sales of a part / sum of sales of all parts.

We know that calculate(sum(sales)) will be (if we let him) influenced by the "slicers".

The question is thus how we make a measure that defines the ALL PARTS segment, as we want that all part to be dynamic based on selection. That's where it hit me:

 

USE ALLSELECTED on the table you allow the recalculation to be done. And it works ... The total of all parts is recalculated based on filter selection.

 

What's your opinion on this?

Thanks a bunch.

Hi @thibbos ,

 

I think so too, thank you for sharing.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors