Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
MrBertie
Frequent Visitor

Convert Monthly Cumulative (Running) Total to Monthly Absolute Totals

I have a dataset with monthly cumulative totals for all financial columns.  Is there an easy way to convert the cumulative total in one column into an absolute monthly total instead?

 

(Yes, I have done the required couple of hours of googling, but I can't seem to find it or maybe I'm just asking the wrong question...)

6 REPLIES 6
kateshepardphd
Advocate I
Advocate I

I had to modify the formula -- maybe this will help someone:

Absolute =
VAR MonthSpent = TableName[Date].[MonthNo]
RETURN
    CALCULATE (
        MIN(TableName[CumulativeColumn])
            - CALCULATE (
                MIN(TableName[CumulativeColumn]),
                ALL ( TableName ),
                TableName[Date].[MonthNo]
                    = MonthSpent - 1
            )
    )
Baskar
Resident Rockstar
Resident Rockstar

For my uderstanding  do u want keep single record for month ? 

 

ya we can do. Share some sample data with expecting result .

i will help u to achieve your goal my dear friend .

Hello friend,
This is exactly what i want.

For example, consider the below image.

sample.PNG

 

The data i have is in the cumulative form,
But i want it to be absolute, to transform the cumulative column using Power Bi into absolute column as in the image.

 

I hope you understood, please help.

In my dataset I have the month number and Cumulative Total, I would like to calculate the absolute monthly spending as in the example below.

Image 4.png

 

@MrBertie

 

Hi, You can create a new column in your table:

 

Absolute =
VAR MonthSpent = Spending[Month]
RETURN
    CALCULATE (
        SUM ( Spending[Cumulative] )
            - CALCULATE (
                SUM ( Spending[Cumulative] ),
                ALL ( Spending ),
                Spending[Month]
                    = MonthSpent - 1
            )
    )

If your data miss the 4 month: You can add a IF

 

Absolute =
VAR MonthSpent = Spending[Month]
RETURN
    IF (
        COUNTROWS ( FILTER ( ALL ( Spending ); Spending[Month] = MonthSpent - 1 ) )
            > 0,
        CALCULATE (
            SUM ( Spending[Cumulative] )
                - CALCULATE (
                    SUM ( Spending[Cumulative] ),
                    ALL ( Spending ),
                    Spending[Month]
                        = MonthSpent - 1
                )
        ),
        CALCULATE (
            SUM ( Spending[Cumulative] )
                - CALCULATE (
                    SUM ( Spending[Cumulative] ),
                    ALL ( Spending ),
                    Spending[Month]
                        = MonthSpent - 2
                )
        )
    )

 




Lima - Peru

Hello,

There might be situations where there are many line-items in a single month or single day which are also cumulative.

Can you help me in solving this issue?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.