Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Running Average on a Measure

I need help. I have attached a pbix file. in the file, i would like to create the Table[Measure 2] directly in the Sheet1 table without having to create the calculated table "Table". This is becuase ...
  • Anonymous's avatar
    Anonymous
    7 years ago

    TeigeGao  Oh! I finally got it! Yay!

     

    try =
    AVERAGEX (
        CALCULATETABLE (
            GROUPBY (
                'Sheet1',
                'Sheet1'[Loan Life],
                'Sheet1'[Vintage],
                "Denomi"SUMX ( CURRENTGROUP (), 'Sheet1'[ Denominator Column] )
            ),
            FILTER (
                ALLSELECTED ( Sheet1[Loan Life] ),
                ISONORAFTER ( Sheet1[Loan Life], MAX ( Sheet1[Loan Life] )DESC )
            )
        ),
        [Denomi]
    )