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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
constantin_250
New Member

Wrong general total in Power BI Matrix

Hello,

I want to calculate the Herfindalh-Hirschmann Index (sum of market shares at square) by videogame publisher. In Power BI, i have 2 measures, the market share and the square of market share for each publisher. My calculations are good but the general total is false for the square of market share. Can you help me to correct the general total ? 

Capture d'écran 2024-01-29 221342.png

My DAX code is this for the Market Share (correct calculation & total) :

 

 

 

Market Share = VAR Volume = SUM('Sales - Global'[Sales]) VAR AllVolume = CALCULATE(SUM('Sales - Global'[Sales]), ALL('Publisher')) RETURN DIVIDE(Volume, AllVolume)

 

 

 

 

 My DAX code is this for the Squared Market Share. I ant to conserve the (*100) to better interprete the result. Calculations are good but the general total is incorrect. :

 

 

 

Market Share Square = VAR Volume = SUM('Sales - Global'[Sales]) VAR AllVolume = CALCULATE(SUM('Sales - Global'[Sales]), ALL('Publisher'[Publisher])) VAR MarketShare = DIVIDE(Volume, AllVolume)*100 RETURN MarketShare * MarketShare

 

 

 

 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@constantin_250 , Create this new measure on top of Market Share Square and use that in visual

 

Sumx(Values('Publisher'[Publisher]), [Market Share Square])

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@constantin_250 , Create this new measure on top of Market Share Square and use that in visual

 

Sumx(Values('Publisher'[Publisher]), [Market Share Square])

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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