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

View all the Fabric Data Days sessions on demand. View schedule

Reply
IliaS
Regular Visitor

DAX to calculate Value share

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.

 

 

2 REPLIES 2
Anonymous
Not applicable

It's difficult to help you without more information.

 

Could you provide more information on the data model?

 

If you want to help yourself I would try to see, what the value is for each SUM part of the division and then see if both columns gives a wierd number.

 

Sum of ABS_Company := SUM(table[ABS_COMPANY])
Sum of ABS_Total := SUM(table[ABS_TOTAL])

 

My hypothesis would be that Name does not have a proper relationshop in the data model.

Hi! Unfortunately I cannot share data as it is sensitive and generation sample one will take a lot of time. What do you mean by "name does not have a proper relationship in the data model"? I have the single table with all the data I describe, what relationship should I have? I've tried to build hierarchy on Fields pane, but this does not help

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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