Forum Discussion

cool_333's avatar
cool_333
Frequent Visitor
3 years ago
Solved

DAX help

Hi I need help with dax , output should be as per last 2 columns Compund Inflation & Quaterly Inflation using dax, please help. Month Quarter Inflation Compounded Inflation Quarterly Inflatio...
  • ppm1's avatar
    3 years ago

    Please try these measure expressions. Format them as a percentage. Replace T2 with your actual table name.

     

    Compound =
    VAR maxdate =
        MAX ( T2[Month] )
    RETURN
        1
            + CALCULATE ( SUM ( T2[Inflation] ), ALL ( T2 ), T2[Month] <= maxdate )
    
    Compound Quarter =
    VAR maxdate =
        MAX ( T2[Month] )
    RETURN
        1
            + CALCULATE (
                SUM ( T2[Inflation] ),
                ALL ( T2 ),
                VALUES ( T2[Quarter] ),
                T2[Month] <= maxdate
            )

     

    Pat