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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Start Date & End Date in additional agreements

Hi everyone,

 

I have a column of agreements like this:

1.PNG

 

And should to combine it to this form:

 

2.PNG

The logic is simple: additional agreements were concluded during the period of the main agreement (1, 2). The rate was changed.

And in a final, I have to get the table like this one:

3.PNG

 

Does anyone have an idea how to move forward from here?


Many thanks,

Konstantin

 

 

*Data first picture:

name_clientdate_startdate_endrateagreement
mr_x01.10.201730.09.201932001
mr_x01.12.201730.09.201934001
mr_x01.01.201830.09.201934001
mr_x01.12.201830.09.201934001
mr_x01.01.201930.09.201936001
mrs_y29.03.201930.09.201936002
mrs_y01.10.201930.09.202436002
3 REPLIES 3
amitchandak
Super User
Super User

@ImkeF , can you help on this

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @Anonymous ,

you can use this function to get the value from the next column and subtract a day to get the end date as a first step:

https://www.thebiccountant.com/2018/07/12/fast-and-easy-way-to-reference-previous-or-next-rows-in-power-query-or-power-bi/

(use the group-parameters in there)

After that you can use this function to parse out the days: https://www.thebiccountant.com/2017/12/11/date-datesbetween-retrieve-dates-between-2-dates-power-bi-power-query/

 

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Anonymous
Not applicable

Hi @ImkeF 

thanks for your help

trying to solve it.

 

Please, close this tread - dublicated it by mistaken.

Continuation of the topic: https://community.powerbi.com/t5/Power-Query/Start-date-amp-end-date-in-custom-column-by-day/td-p/12...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors