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

PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.