Forum Discussion

gcam032's avatar
gcam032
Icon for Helper I rankHelper I
6 years ago
Solved

Calculate within group % over xaxis

Hi All,   Haven't found the exact answer in the forums that seems to work for what I need. I have a chart (see image) where the xaxis is a categorical variable (0, 100, 200, 300, 400.... 1000) gro...
  • v-kelly-msft's avatar
    6 years ago

    Hi gcam032

     

    1.Create a dim table:

     

     

     

    dimdate = ADDCOLUMNS(CALENDARAUTO(),"YEARMONTH",YEAR([Date])*100+MONTH([Date]))

     

     

     

    2.Create a measure:

     

     

     

    Measure = CALCULATE(SUM('Table'[value])) / CALCULATE(SUM('Table'[value]),ALLEXCEPT('Table','Table'[Category]))

     

     

     

    Finally you will see:

     

     

    For the related .pbxi file,pls click here.

     

    Best Regards,
    Kelly
    Did I answer your question? Mark my post as a solution!