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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
madsdotme
Regular Visitor

Help: Seperate accumulated costs by year

Hei guys!

 

By using this forum I've now found out how to get accumultated costs using the code below.

 

Accumulated Costs = 
CALCULATE(
	SUM('Data'[Costs]);
	FILTER(ALLSELECTED('Data');
		'Data'[Time.Date] <= MAX('Data'[Time.Date])
))

image.png

I would prefer to have two seperated lines with accumulated costs - one for each of the years. 

Any suggestion to how I can do this? 

 

I am temporarely solving this by using two charts. 

 

image.png

 

1 ACCEPTED SOLUTION
tsapat
Advocate I
Advocate I

Probably the best way about it is to create two measures, one for each year, and put them on the line chart. Just filter each measure with the appropriate year.

 

The X-Axis would have to be the month / year of your time dimension.

 

 

View solution in original post

2 REPLIES 2
madsdotme
Regular Visitor

Ok, thank! That did it.

tsapat
Advocate I
Advocate I

Probably the best way about it is to create two measures, one for each year, and put them on the line chart. Just filter each measure with the appropriate year.

 

The X-Axis would have to be the month / year of your time dimension.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.