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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dgilm33
Helper I
Helper I

Trying to get market share to total 100% per column

Hello, I am currently working on something to try and show market share for two different categories. I'm having trouble though getting each column to show the percent of that category.  I have looked and tried several different formulas posted online, however I haven't had any luck with them. I also do not want to do "Show as % of grand total" as I am trying to show a variance as well and the percent of grand total does not show the variance correctly. I have attacehd snippets of the sample data with the columns, measures, and steps I have taken to try and  accomplish this. In the sample data, my goal would be to show 100% for shooting earnings, 100% for dunking earnings, and the correct variance.

dgilm33_0-1663803919727.png

 

dgilm33_1-1663803935435.pngdgilm33_2-1663803960255.pngdgilm33_3-1663803979625.png

dgilm33_4-1663803998107.pngdgilm33_5-1663804016069.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Delete all your calculated column formulas.  To your matrix visual, drag Player from the Attributes Table and Skills from the Players Table.  Write these measures:

Earned = sum(Data[Earnings])

Total earned = calculate([Earned],all(Attributes[Player]))

Earnings (%) = divide([Earned],[Total earned])

Hope this helps.


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

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

Delete all your calculated column formulas.  To your matrix visual, drag Player from the Attributes Table and Skills from the Players Table.  Write these measures:

Earned = sum(Data[Earnings])

Total earned = calculate([Earned],all(Attributes[Player]))

Earnings (%) = divide([Earned],[Total earned])

Hope this helps.


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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.