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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
IliaS
Regular Visitor

Calculating Market Share via DAX query

Hi! 

I am trying to calculate market share, but struggling with doing it correctly.

 

I have a matrix where I have Category, Name as rows, Channel as column, and Market Share as value.

 

Also In my dataset I have columns ABS_COMPANY (with sales inputted there if company = "A", so there are some blank ones), and ABS_TOTAL (with sales inputted in each row)

 

so my measure Market Share:

 

Market Share = SUM(table[ABS_COMPANY]) / SUM(table[ABS_TOTAL])

 

This correctly calculates values for each Category, but when I open the drop-down to see Name, Market Share of each Name equals to 100%. What is the problem and how to fix it?

 

e.g. What is now:

                    Market Share

Pens                  43%
     pen 1           100%

     pen 2           100%

     pen 3           100%

Pencils               29%

     penc 1          100%

     penc 2          100%

     penc 3          100%

 

expected to calculate market share for each name, not only for categories correctly

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @IliaS,

It seems like a common measure total level calculation issue when you use it to handle multiple aggregations, you can take a look at the Greg’s blog to know to fix it:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @IliaS,

It seems like a common measure total level calculation issue when you use it to handle multiple aggregations, you can take a look at the Greg’s blog to know to fix it:

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

Ashish_Mathur
Super User
Super User

Hi,

Share some data (in a form that can be pasted in an MS Excel file or the PBI file itself) and clearly show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.