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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Joost
Regular Visitor

Accumulated values with calendar

Hi,

 

I am having a slight problem and was hoping someone could help me.

I want to display the costs of projects so far along with the time they occured in. The projects have a start and end date. Thus, I made a calendar table:

 

Calendar = CALENDAR(MIN('P2Project-FULL'[Start date]),DATEVALUE("31-May-2017"))

 

I then calculate the costs with the following measure:

Actuals period = CALCULATE(SUM('P2Project-FULL'[Costs Actual]),FILTER('P2Project-FULL','P2Project-FULL'[Start date] <= MAX('Calendar'[Date])))

The total amount is how I want to have it as it coressponds with the total amount of the colum [Costs Actual] from the table P2Project-Full. 

 

The problem I am getting however is that when I put them in a line and clustered chart, the amounts of each year add up to the total (in 2017). Let me show you what I mean with a picture:

1.png

 

 As you can see the values are accumalating for the green bars, as now for instance 2016 = 2016 + 2015 + 2014. 

What I want is that the year only counts for that year, so 2016 only counts the values of 2016 etc. 

 

Can anyone help me fix this? 

 

1 ACCEPTED SOLUTION

@Joost i could be wrong but it looks like you linking to the max date in your calendar which might not work, since you need it to take start and end date of the project correct?

 

a few questions 

1. do you have a date table

2. what date in the date in the date table linked to in your data?

 

post pic of your relationship view please 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
vanessafvg
Super User
Super User

@Joost

 

your calculate is a cummulative figure  ie. 

P2Project-FULL'[Start date] <= MAX('Calendar'[Date])))

 from you will need to get the correct end date to not cummulate





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg Could you elaborate? I don't really understand what you mean.

@Joost i could be wrong but it looks like you linking to the max date in your calendar which might not work, since you need it to take start and end date of the project correct?

 

a few questions 

1. do you have a date table

2. what date in the date in the date table linked to in your data?

 

post pic of your relationship view please 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thank you very much, I completely missed the relationship between the dates of the two tables, oops. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.