Forum Discussion

shravanreddy133's avatar
2 years ago
Solved

Percentage total in matrix visual

Hi All,

 

I am having trouble with the matrix visual where the percentage total is not correct.

 

my percentage measure is just sales/budget. But the total is wrong as you see.

 

Any help is much appreciated.

 

Thanks

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi shravanreddy133 

     

    Assume that your [Sales vs Budget] is a measure and you have a [project] column on rows, you can create a new measure like below which references your current measure and use this new measure as a value in the matrix

    new measure =
    DIVIDE (
        SUMX ( VALUES ( 'TableName'[Project] ), [Sales Vs Budget] ),
        CALCULATE ( DISTINCTCOUNT ( 'TableName'[Project] ), [Sales Vs Budget] > 0 )
    )
    

    FYI: Obtaining accurate totals in DAX - SQLBI

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

4 Replies

  • Hi,

    469.87% is correct i.e. 42001.36/8939.03.  What's the mistake?

    • shravanreddy133's avatar
      shravanreddy133
      Icon for Helper I rankHelper I

      i want it to display 83.72%+ 100.66%+ 101.19% + 50.4% = 335.97 /4 = 83.99 %. Exclude the ones with no budget.