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
Anonymous
Not applicable

Line Charts with Cumulative values

Hello

 

Firstly, I'm only a beginner with Power BI so please forgive me if this is a silly question.

 

I'm graphing my actual expenditure to date as a cumulative total however the line continues past the current month showing the current month's value. I’m wanting the line to end as at the current month.

 

Is there a setting in Power BI that can fix this or could someone please assist with amending the measure?

 

Cumulative payments = CALCULATE(SUM('Money Transfers 201819'[MT amount for charts]),FILTER(ALL('Calendar'[Date]),'Calendar'[Date]<=MAX('Calendar'[Date])))

 

 

Thank you in advance!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Give this a try:

Cumulative payments = var contextDate = MAX('Calendar'[Date])
var output = CALCULATE(
	SUM('Money Transfers 201819'[MT amount for charts]),
	FILTER(ALL('Calendar'[Date]),
	'Calendar'[Date] <= contextDate)
)
RETURN
IF(
	contextDate <= Today(),
	output
)

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Give this a try:

Cumulative payments = var contextDate = MAX('Calendar'[Date])
var output = CALCULATE(
	SUM('Money Transfers 201819'[MT amount for charts]),
	FILTER(ALL('Calendar'[Date]),
	'Calendar'[Date] <= contextDate)
)
RETURN
IF(
	contextDate <= Today(),
	output
)

 

Anonymous
Not applicable

Thanks so much, worked perfectly!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.

Top Solution Authors
Top Kudoed Authors