Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
Hi everyone,
I've got a table that represents the hours of work of some employees.
It contains the name of the employee, the start date and time and the end date and time:
My intent is to duplicate each row to obtain a row containing the starting date and a row containing the ending date of each employee, something like this:
Because my intent is to create a relation between Table.DateStart and the Calendar Table. Do you know how can I do it, using Power Query? Thank you so much.
Solved! Go to Solution.
So before merging column create conditional column to check if DataStart <> DataEnd if true then merge : DataStart & "|" & DataEnd else null
And now split this conditional column !
In Power Query :
- Merge DataStart and DataEnd into one column with pipe ("|") delimiter for example
- Split this column on row (not column)
You should get what you want
@freginier thank you so much, it works!
But I have another problem: if I wanted to "split" only the rows where DataStart is different from DataEnd?
The ideal result would be this:
Thanks.
So before merging column create conditional column to check if DataStart <> DataEnd if true then merge : DataStart & "|" & DataEnd else null
And now split this conditional column !
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
70 | |
68 | |
50 | |
32 |
User | Count |
---|---|
117 | |
100 | |
73 | |
65 | |
40 |