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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Search from multiple columns

I have a table with multiple columns. The table is about users usage of different applications. The same application can be in any column. For user one it can be in column 1 and for user two in column 2. The columns are not empty so I cannot merge all the colums directly into a new column. I have to find all the rows including a specific application in any of the columns. Is this possible? Thank you.

1 ACCEPTED SOLUTION

@Anonymous - I have attached a PBIX file with what I think you attempting to accomplish.

image.png

Power Query

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckwpSk1U8NZT0lEKyC9PLXLyVAgoysfgKcXqANXmpFYouGEq9c1MLsovzk8rUTA2M1VwNQYpKMrPSk0uUQjQA+v0rsxJVXDXQ5VAGONWlJqKZipclw82hciGgJX6JhZVYnMaRSozc1IrFYL0CPoQzX0gvSEZ+bmJxQrBGF6GGR6Sn6sQgstotKCPBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DisplayName = _t, Products1 = _t, Products2 = _t, Products3 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"DisplayName", type text}, {"Products1", type text}, {"Products2", type text}, {"Products3", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"DisplayName"}, "Attribute", "Value"),
    #"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] <> ""))
in
    #"Filtered Rows"

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
ChrisMendoza
Resident Rockstar
Resident Rockstar

@Anonymous - To me it seems you are describing your data as cross-tabulated and you need to un-pivot the columns which can easily be done in Power Query. Please reply with a sample of your data (be sure to remove sensitive data) so we can further assist you.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

So my data looks like this but has more columns and rows. For example I should search all the users using Project P.

example.PNG

@Anonymous - I have attached a PBIX file with what I think you attempting to accomplish.

image.png

Power Query

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckwpSk1U8NZT0lEKyC9PLXLyVAgoysfgKcXqANXmpFYouGEq9c1MLsovzk8rUTA2M1VwNQYpKMrPSk0uUQjQA+v0rsxJVXDXQ5VAGONWlJqKZipclw82hciGgJX6JhZVYnMaRSozc1IrFYL0CPoQzX0gvSEZ+bmJxQrBGF6GGR6Sn6sQgstotKCPBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [DisplayName = _t, Products1 = _t, Products2 = _t, Products3 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"DisplayName", type text}, {"Products1", type text}, {"Products2", type text}, {"Products3", type text}}),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"DisplayName"}, "Attribute", "Value"),
    #"Filtered Rows" = Table.SelectRows(#"Unpivoted Columns", each ([Value] <> ""))
in
    #"Filtered Rows"

 






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.