Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
anshpalash
Helper II
Helper II

Data Cleaning

Hi,

 

I have a dataset in the form.

1nullStart: 7:20nullnullDuration: 3nullEnd:10
1nullnullnullnullnullnullnull
1nullnullnullnullnullnullnull
1nullnullnullnullnullnullnull
2Start: 6:30nullnullDuration:5nullnullEnd:11
2nullnullnullnullnullnullnull
2nullnullnullnullnullnullnull
2nullnullnullnullnullnullnull
2nullnullnullnullnullnullnull
3nullnullnullnullnullnullnull
3nullnullnullnullnullnullnull
3Start: 9:15nullnullDuration:4nullEnd:1null
3nullnullnullnullnullnullnull
3nullnullnullnullnullnullnull
3nullnullnullnullnullnullnull

 

I want to convert it to format:

 

1Start: 7:20Duration: 3End:10
2Start: 6:30Duration:5End:11
3Start: 9:15Duration:4End:1

 

I would really appreciate if someone could advise how to achieve this since there is so much irregularity in the position of the start, duration, and end across different files. Thank you!

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

You can this step to your query.

= Table.FromRows( List.RemoveNulls( List.Transform(Table.ToRows(PriorStepName), each let l=List.RemoveNulls(_) in if List.Count(l)>1 then l else null) ), {"ID","Start","Duration","End"} )

Result

Jakinta_0-1632940649523.png

 

View solution in original post

4 REPLIES 4
Jakinta
Solution Sage
Solution Sage

...or slightly cleaner...

= Table.FromRows( List.Select(List.Transform(Table.ToRows( PriorStepName ), List.RemoveNulls), each List.Count(_)>1 ), {"ID","Start","Duration","End"} )
Syndicate_Admin
Administrator
Administrator

You can this step to your query.

= Table.FromRows( List.RemoveNulls( List.Transform(Table.ToRows(PriorStepName), each let l=List.RemoveNulls(_) in if List.Count(l)>1 then l else null) ), {"ID","Start","Duration","End"} )

Result

Jakinta_0-1632940649523.png

 

Thank you so much!

Jakinta
Solution Sage
Solution Sage

You can add this step to your query.

 

= Table.FromRows( List.RemoveNulls( List.Transform(Table.ToRows(PriorStepName), each let l=List.RemoveNulls(_) in if List.Count(l)>1 then l else null) ), {"ID","Start","Duration","End"} )

 

Result

Jakinta_0-1632940649523.png

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.