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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Nero_Carbone
Regular Visitor

Running Total per week/month

Hello,

 

I would like to have a measure in power pivot for the running total that behaves like the one in the normal pivot tables.

For instance, in the pivot table below the value are shown as running totals based on the week number (y axis).

The running total is based on the week number, and for example after w6 in January it`s still reported the maximum value for the month.

Nero_Carbone_7-1725035685709.png

 

Here it's the most i managed to accomplish via power pivot:

Nero_Carbone_6-1725035608283.png

 

Here the code for the measure:

ActualsRunningTotal:=TOTALYTD(SUM(Actuals[Volume]), Actuals[Date], ALL(Actuals))

 

Here the structure of the model, highlighted the fields i use in the pivot.

Nero_Carbone_5-1725035391817.png

I didn`t quite manage to find online how to handle this case, any ideas? Should i adjust the relationship between tables or use different functions?

I`m doing it via power pivot because then i would need to combine the measure with other two, for which I only need the normal totals.

 

Thank you in advance, any help is very much appreciated

KR

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@Nero_Carbone Perhaps one of these can help:

(1) Better Running Total - Microsoft Fabric Community

Better Year to Date Total - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Nero_Carbone
Regular Visitor

Thanks for leading me on the right direction @Greg_Deckler !

 

In the end i managed to accomplish what i needed with the following:

 

ActualsRunningTotal:=SUMX(FILTER(ALLSELECTED(Actuals),

'Actuals'[Date (Month Index)]=MAX(Months[MonthNum])&&

Actuals[WeekID]<=MAX(WeekID[WeekID])&&

YEAR(Actuals[Date])=MAX(WeekID[Year])),Actuals[CU])

 

I didn`t need to adapt the structure of the data model.

 

EDIT:

One more question please: despite using ALLSELECTED, it seems like the values don`t change when additional filters are applied to the context (e.g. adding the suppliers on the rows).

Before filters:

Nero_Carbone_0-1725130491949.png

After detailing supplier:

Nero_Carbone_1-1725130585237.png

 

How can i fix it please?

 

@Nero_Carbone Difficult to say. I would make sure that the proper relationships exist first. Often, when you see repeated values in a table it is the result of a missing or incorrect relationship.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@Nero_Carbone Perhaps one of these can help:

(1) Better Running Total - Microsoft Fabric Community

Better Year to Date Total - Microsoft Fabric Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.