Forum Discussion
Splitting a row and creating two rows
My task is to create a new row if the start time and end time column values span from one day to another. This is for a time entry report. So if starting time is 2300 and ending time is 0300 then what I need to do (and hoping to use DAX to do this) is to take the original column, turn the ending time to 0000 (or 2400), but then create a NEW row with duplicated data except for start time 0000 and then the end time will be the same 0300.
Thanks for any advice and direction to help me achieve this.
Hi guyinazo ,
According to your description, you can try to do the related operation in power query.
Then you can add column to extract the start time and end time for comparison. Filter out rows with more than the full number of days.
If the problem is still not resolved, please provide the test data (with sensitive information removed) and the desired results. I will answer you as soon as possible.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- amitchandakSuper User
guyinazo , With help from date table generate a table like
filter(GENERATE(table, 'Date'), Table[Start Date].date<=Date[Date] && Table[End date].date >= Date[Date])
Then add column to keep required start and end date
- v-henryk-mstfCommunity Support
Hi guyinazo ,
According to your description, you can try to do the related operation in power query.
Then you can add column to extract the start time and end time for comparison. Filter out rows with more than the full number of days.
If the problem is still not resolved, please provide the test data (with sensitive information removed) and the desired results. I will answer you as soon as possible.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.