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.
I have the below table:
Start Date of Contract | End Date of Contract | Contract |
1/7/2019 | 31/8/2019 | X |
1/9/2019 | 31/3/2020 | X |
12/5/2020 | 31/12/2021 | X |
1/4/2017 | 31/3/2018 | Y |
1/4/2018 | 31/3/2020 | Y |
11/5/2020 | 31/12/2021 | Y |
I want to split the overlapping dates for each contract like below:
Start Date of Contract | End Date of Contract | Contract |
1/7/2019 | 31/12/2019 | X |
1/9/2019 | 31/12/2019 | X |
1/1/2020 | 31/3/2020 | X |
12/5/2020 | 31/12/2020 | X |
1/1/2021 | 31/12/2021 | X |
Similarly for contract Y. Is this possible?
@mow700 @Smauro @Mariusz @HotChilli @edhans @mahoneypat
Solved! Go to Solution.
Hi
this is done in my solution here: https://community.powerbi.com/t5/Desktop/Need-urgent-help-DAX-calculation/m-p/1216539#M541668
(Assuming there is an error in the first row of the sample you've provided and it ends end of August and not end of year:
Start Date of Contract | End Date of Contract | Contract |
1/7/2019 | 31/08/2019 | X |
1/9/2019 | 31/12/2019 | X |
1/1/2020 | 31/3/2020 | X |
12/5/2020 | 31/12/2020 | X |
1/1/2021 | 31/12/2021 | X |
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.