Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Help with calculating Market Share using DAX code

Hi there!


I am trying to calculate market share for a specific segment, which I have shown in a table. However, since there are a large number of players, I've filtered the table down to just show the top 15. Obviously, doing $ as a percent of total on the new table makes the sum of the $ for the top 15 players the denominator, not the sum of all players in that segment (what I want to calculate share in the segment).


I've tried DAX code in a variety of different ways, but I can't seem to get it to work. My challenge is that the "Rank" figure I am using to calculate the top 15 is a measure, and you can only use "ALLEXCEPT" on a column, not a measure. I am live connected to Analysis Services, so unfortunately this is the only option I have to define the rank.


Does anyone have a suggestion for how I can get the table to show segment market share? 


Let me know if this makes sense. Thanks in advance for your help!



Not applicable

More precision, please, and pictures. Make it as clear as possible. Remember that we have not worked on your data and model, so we're completely in the dark about what you're trying to do. If people can't figure out what it is you're trying to achieve, they will not help you.






Helpful resources

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors