Forum Discussion
Getting/generating all dates (days) between multiple dates per ID
Hi davetech007 ,
You can refer the content in the following links to get it after you get the right date range:
Fill dates between dates with Power BI / Power Query
I created a sample pbix file(see attachment), please check whether that is what you want.
Best Regards
Hi Anonymous !
Thank you for your answer!
Thank you, i have checked your solution, and it is really optimized and clear, but:
- it has the same result, which i already have: dates between 1 min and 1 maximum date per ID. What i really want is, to always consider the columns "NewStatus" too.
Like in this screenshot, the dates should be generated between:
- from the first date, when "NewStatus" leaves any of "Open"; "Selected for Development"; "Closed"
- until "NewStatus" has a value again, "Open" or "Selected for Development" or "Closed". That means, these dates should be then NOT generated
- IF the last "NewStatus" last value not equals to "Closed", the last (MAX) date should be generated until today, because it means it is still not a closed issue!
For example for ID 481721 should be (in purple the considered values):
- 23.03.2020 till 02.06.2020 (after "NewStatus" leaves Open, until Open again!)
- it starts again from 12.10.2020 till 04.11.2020
- 02.12.2020 - 03.01.2021
- 17.02.2021 - 26.02.2021 (after it was closed, somebody opened this issue again)
For ID 559737:
- 08.03.2021 - 22.03.2021
- 24.03.2021 - TODAY() (because the latest "NewStatus" not equals "Closed")
I hope it is clear! And i hope, that you could help me to solve this case!
Thank you very much in advance!
Best Regards,
David