Forum Discussion

JayKarim's avatar
JayKarim
Frequent Visitor
4 years ago
Solved

Cumulative MTD Total

Hi Power BI Community, 

 

I have a data set, I want to create a  cumulative monthly total bar chart. 

 

The 2 fields I will be using are 'Payment Date' and 'USD Paid'. See the data table below

 

Based on this how can I represent the cumulative totals in a bar graph? 

 

Many in thanks in advance

 

 

 

 

  • JayKarim 

    You can create the following measure to get the cumulative total:

    Cumm Total = 
    CALCULATE(
        SUM(TableName['USD Paid']),
        TableName['Payment Date'] <= MAX(TableName['Payment Date']),
        REMOVEFILTERS(TableName)
    )


    If you have a dates table in your model, it would be better to use it, this should also work.



1 Reply

  • JayKarim 

    You can create the following measure to get the cumulative total:

    Cumm Total = 
    CALCULATE(
        SUM(TableName['USD Paid']),
        TableName['Payment Date'] <= MAX(TableName['Payment Date']),
        REMOVEFILTERS(TableName)
    )


    If you have a dates table in your model, it would be better to use it, this should also work.