Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dax running total after certain Month

Hi Guys, Please could you help with a calculation i need.    I want to calculate Row B. Row B turns into a rolling total after March   Jan Feb Mar Apr May A 15 8 40 2 4 B 15 ...
  • Icey's avatar
    6 years ago

    Hi Anonymous ,

     

    Try to create a measure like so:

    Measure =
    IF (
        MAX ( 'Calendar'[MonthNo.] ) > 3,
        CALCULATE (
            SUM ( Sales[Sales] ),
            FILTER (
                ALLSELECTED ( 'Calendar' ),
                'Calendar'[MonthNo.] <= MAX ( 'Calendar'[MonthNo.] )
                    && 'Calendar'[MonthNo.] >= 3
            )
        ),
        SUM ( Sales[Sales] )
    )
    

    BTW, .pbix file attached.

     

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.