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
RVLee
Frequent Visitor

Calculating future dates trend

Hi,

 

I need some ideas to get future trend value.

I have a table called Contract, and it has records with the contract start date and end date for each day, only until current year, which is before the year of contract end date, or at the year if the current year is the end date.

For a clearer picture, here's the example of the table.

Contract NameVersionDateContract Start DateContract End DateValue
Contract A11/1/20211/1/202112/31/2023100
Contract A11/2/20211/1/202112/31/2023100
(Contract A rows exist until Date = today)   
Contract B13/1/20213/1/20212/28/2022500
Contract B13/2/20213/1/20212/28/2022500
(Contract B rows exist until Date = Contract End Date for version 1) 
Contract B23/1/20223/1/20222/28/2024490
Contract B23/2/20223/1/20222/28/2024490
(Contract B rows exist until Date = Contract End Date for version 2) 
Contract C15/1/20215/1/20215/1/2022300
Contract C15/2/20215/1/20215/1/2022300

 

And the result I'm trying to create is below - which I can use to put in the line graph for future trend of contract value.

Contract NameYearValue(Notes on calculation)
Contract A2022100 
Contract A2023100 
Contract B2022490Retrieving Contract Value at the end of year
Contract B2023490 
Contract B2024490 
Contract C2022300Include the active contracts in the year although it ended before end of year

 

I have a Calendar table that has one-to-many relationship with the Date column of the Contract table.

I'm open with any way, either creating a table like the result table above, or a measure calculation.

Looking forward.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@RVLee , refer if the file / blog to deal with date ranges can help  you

 

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

File attached after signature

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@RVLee , refer if the file / blog to deal with date ranges can help  you

 

https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

File attached after signature

 

Hi @amitchandak,

 

Awesome! It gives me an idea on how to generate the years through certain periods. Thanks a lot!

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.