Forum Discussion

dadelta's avatar
dadelta
Frequent Visitor
7 years ago
Solved

Getting monthly figure from cumulative figure

My report is broken down into subtotals.  I created a measure to get the total.  My DAX for the total looks like this:   Line 17 = SUMX('1257csv',[Cell050] + [Cell051] + [Cell052])  (Cell050 etc ar...
  • v-piga-msft's avatar
    7 years ago

    Hi dadelta,

     

    For your scenario, you could create an index column in Query Editor. 

     

    Then create the measure below.

     

    Measure =
    VAR a =
        CALCULATE (
            [Line 17_],
            FILTER ( ALL ( 'Table1' ), 'Table1'[Index] = MAX ( 'Table1'[Index] ) - 1 )
        )
    RETURN
        IF (
            MONTH ( MAX ( 'Table1'[Rpt Dt] ) ) = 10,
            'Table1'[Line 17_],
            [Line 17_] - a
        )
    

     

    Best Regard,

    Cherry

  • dadelta's avatar
    dadelta
    7 years ago

    Thank you so much for you assistance Cherry.  This solution works perfectly for what I was trying to accomplish.