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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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