Forum Discussion

constantin_250's avatar
constantin_250
New Member
2 years ago
Solved

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 ? 

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

 

 

 

 

 

 

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

     

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

1 Reply

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

     

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