Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Aggregate Month End Percentages

Say I have the following table:   Measure A        Measure B      Month 5                           10                 Jan 3                           30                 Jan 6                   ...
  • Jihwan_Kim's avatar
    4 years ago

    Hi,

    I assume measure A and measure B are columns.

    Please check the below picture and the attached pbix file.

     

     

    Expected result measure: =
    VAR _newtable =
        ADDCOLUMNS (
            VALUES ( Data[Month] ),
            "@sumcolumnA", CALCULATE ( SUM ( Data[Measure A] ) ),
            "@sumcolumnB", CALCULATE ( SUM ( Data[Measure B] ) )
        )
    RETURN
        AVERAGEX ( _newtable, [@sumcolumnA] / [@sumcolumnB] ) * 100