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
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

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
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.

Top Solution Authors
Top Kudoed Authors