Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Running total calculation - relative filtering

i have created a measure to calculate a running invoice total (see below) and it all works fine. When i add it to a visual i want the graph to reset to zero when i use a relative time filter. For ex...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    I am not sure how your datamodel looks like, but please try the below and check whether it suits your requirement.

     

    Running Total COLUMN =
    CALCULATE (
        SUM ( 'spend report'[sum(Invoice Spend)] ),
        FILTER (
            ALLSELECTED ( 'spend report' ),
            'spend repor'[Accounting Date] <= MAX ( 'spend repor'[Accounting Date] )
        ),
        VALUES ( 'spend report'[Supplier - Supplier Global Ultimate Parent (enr)] )
    )