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 all,

 

I have a dataset similar to format:

Run Timenullnull2:24:21                            60%null
Run Timenull3:41:08         32%nullnull
Run Timenullnull1:23:12          12%null
Run Timenullnullnull3:23:39                                   19%

 

The position of the data is not same across each row. I need to convert this table to format:

Run Time2:24:21
Run Time3:41:08
Run Time1:23:12
Run Time3:23:39

 

Can someone please advise how to dynamically solve this problem? Thank you!

2 ACCEPTED SOLUTIONS
mahoneypat
Microsoft Employee
Microsoft Employee

You should be able to select your first column, right click and choose unpivot other columns.  You can then remove the Attribute column, and filter out values <1 (the % values), to get close to your result.

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

CNENFRNL
Community Champion
Community Champion

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCirNUwjJzE1V0lECIgMjKyMTKyNDINPMQBUkFquDosbA2MrE0MrAAsg0NlKFaEJXA1JmaGVkbGVoBGQaGmEzB6rMGKTM2BKkzFJVKTYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t, Column5 = _t]),
    Custom1 = Table.CombineColumns(Source, List.Skip(Table.ColumnNames(Source)), each List.Select(_, each Text.Contains(_, ":")){0}, "Duration")
in
    Custom1

Screenshot 2021-10-12 052626.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

4 REPLIES 4
CNENFRNL
Community Champion
Community Champion

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCirNUwjJzE1V0lECIgMjKyMTKyNDINPMQBUkFquDosbA2MrE0MrAAsg0NlKFaEJXA1JmaGVkbGVoBGQaGmEzB6rMGKTM2BKkzFJVKTYWAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t, Column5 = _t]),
    Custom1 = Table.CombineColumns(Source, List.Skip(Table.ColumnNames(Source)), each List.Select(_, each Text.Contains(_, ":")){0}, "Duration")
in
    Custom1

Screenshot 2021-10-12 052626.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Thank you!

mahoneypat
Microsoft Employee
Microsoft Employee

You should be able to select your first column, right click and choose unpivot other columns.  You can then remove the Attribute column, and filter out values <1 (the % values), to get close to your result.

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Thank you!

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.