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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Cumulative Running Total by week

I have a Data file that goes like this..

 

 

Year.Week                 Bookings.Value

201850                          5

201850                          3

201850                          3

201850                          2

201850                          0

201851                           . . .

. . .

201852

. . .

201901

. . .

201902

. . .

 

How can I make a column that gives me a running total?

So something like:

Cummulative.Week                     Cummulative.Value

201850                                                  13

201851                                                  = 13 + (201851)

. . .                                                               . . .

1 ACCEPTED SOLUTION
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

In your scenario, you can create a measure:

Cummulative.Value =
CALCULATE (
    SUM ( Table1[Bookings.Value] ),
    FILTER ( ALL ( Table1 ), Table1[Year.Week] <= MIN ( Table1[Year.Week] ) )
)

The result will like below:

PBIDesktop_l7WskFjeYh.png

Best Regards,

Teige

View solution in original post

3 REPLIES 3
TeigeGao
Solution Sage
Solution Sage

Hi @Anonymous ,

In your scenario, you can create a measure:

Cummulative.Value =
CALCULATE (
    SUM ( Table1[Bookings.Value] ),
    FILTER ( ALL ( Table1 ), Table1[Year.Week] <= MIN ( Table1[Year.Week] ) )
)

The result will like below:

PBIDesktop_l7WskFjeYh.png

Best Regards,

Teige

Anonymous
Not applicable

@Anonymous,

There you go:

Cumulative Bookings Value :=
CALCULATE (
    SUM ( 'TableName'[Bookings.Value] ),
    FILTER (
        ALL ( 'TableName'[Year.Week] ),
        'TableName'[Year.Week] <= MAX ( 'TableName'[Year.Week] )
    )
)
Anonymous
Not applicable

All that is doing is returning the original Bookings.Value numbers... Which makes no sense based on the formula but that is what I'm getting

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.