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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.