Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hello,
I am having a problem with displaying the running total of a column in a Line and Stacked Column Chart visual.
This visual is to show forecasted and actual shipping numbers.
The X axis has the option of Fiscal Quarter, Fiscal Month, Fiscal Week, and Calendar Date.
When drilling down by Calendar Date, the running total works as expected. Green is forecasted shipping, and blue is actual. Red is the difference
But it only shows the sum for the given time period when drilling down any other way. (In other words, it's not cumulative.)
Here is the measure for the running total (Green Line):
Solved! Go to Solution.
Edited:
[The Right Measure] =
var MaxFiscalDate = MAX( 'Fiscal Calendar'[Calendar Date] )
var Result =
CALCULATE(
[Shipment Forecast],
KEEPFILTERS( 'Fiscal Calendar'[Calendar Date] <= MaxFiscalDate ),
ALLSELECTED( 'Fiscal Calendar' )
)
return
Result
There would be too much to explain about how ALLSELECTED works...
Edited:
[The Right Measure] =
var MaxFiscalDate = MAX( 'Fiscal Calendar'[Calendar Date] )
var Result =
CALCULATE(
[Shipment Forecast],
KEEPFILTERS( 'Fiscal Calendar'[Calendar Date] <= MaxFiscalDate ),
ALLSELECTED( 'Fiscal Calendar' )
)
return
Result
There would be too much to explain about how ALLSELECTED works...
@Anonymous
This does work as a running total, but I don't want it to count anything before the selected period. So in filters from my example, nothing before Fiscal Q2 of 2021.
I've edited my measure... which now works as expected.
This works for the green line on my visual!
Unfortunatley both the green line and the blue columns (Total Shipped) were having the same issue, and following the same logic with Total Shipped didn't work. In fact, it made it not cumulative when drilling down on both Calendar Date and Fiscal Week.
Here is the original measure:
And here is the one I tried to model off of your solution:
@Anonymous
I created a simple model to test it and it works the way it should. If it does not work in your case, then it means... there's something amiss about your model.
I think you must be right. Thank you for the help!
@Anonymous After fixing my model, the issue was resolved. However I noticed that that when I select multiple options in any slicer, the running total resets after that time interval. With one selected or none in each slicer, there are no issues. In the example below, I have weeks 1-5 selected.
The Total Shipped (Blue) and Shipment Forecast (Green) follow the format of your measure above. Any idea on why this is happening?
Instead of going back and forth aimlessly and fruitlessly... please place a link to the file in here. I'll then resolve all the issues you have. Promise.
@Anonymous What happens if you base your running total on Fiscal Week instead of the Date?
@Greg_Deckler
I tried changing the running total measure to
@Anonymous Not entirely certain but perhaps you need ALL not ALLSELECTED. Very hard to decipher what may be going on without something to play with.
@Greg_Deckler This works as a running total, but I need this visual to not count anything before the selected period. So in filters from my example, nothing before Fiscal Q2 of 2021.