Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi I have a table of data with blanks that need to be filled in from the previous row
The original table looks like this
Origin Destination Depart Arrival Code
Kodiak Kitoi Bay 11:00AM 11:25AM 501
Seal Bay 11:45AM 511
Port William 12:25PM 521
I need to fill in the blanks Origin by adding the previous destination and then I need to fill in the blank depart by previous arrival + 5 mins
This is how the output should look
Origin Destination Depart Arrival Code
Kodiak Kitoi Bay 11:00AM 11:25AM 501
Kitoi Bay Seal Bay 11:30AM 11:45AM 511
Seal Bay Port William 11:50AM 12:25PM 521
Solved! Go to Solution.
Assuming your table is called Table1 (Replace Table1 with your table name in all the code below)
IN POWER QUERY (Transform Data)
First you'll need to make an index column within PowerQuery/Transform Data so DAX will know how to declare an order.
Then add a custom column, call it NextDepart and add the following code
[Arrival] + #duration(0,0,5,0)
Then set this new column to be in the "TIME" data format.
Exit out of Power Query, (close and apply)
IN DAX
Make 2 columns to replace Origin and Depart with the following DAX code:
Note: For Origin2. If it's not populating correctly. replace IF((Table1[Origin]="") in the code with (ISBLANK(Table1[Origin])
Assuming your table is called Table1 (Replace Table1 with your table name in all the code below)
IN POWER QUERY (Transform Data)
First you'll need to make an index column within PowerQuery/Transform Data so DAX will know how to declare an order.
Then add a custom column, call it NextDepart and add the following code
[Arrival] + #duration(0,0,5,0)
Then set this new column to be in the "TIME" data format.
Exit out of Power Query, (close and apply)
IN DAX
Make 2 columns to replace Origin and Depart with the following DAX code:
Note: For Origin2. If it's not populating correctly. replace IF((Table1[Origin]="") in the code with (ISBLANK(Table1[Origin])
Thankyou , the code worked perfectly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
90 | |
89 | |
79 | |
70 | |
68 |
User | Count |
---|---|
222 | |
128 | |
117 | |
82 | |
77 |