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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ODash
Regular Visitor

Combing Data Fields

Hi,

 

I'm relativly new to Power BI and am at the exploring stage to see if it can work for me.

 

I've got to a point of I know what I'd like to do, but not even sure if it's possible, so hopefully someone can assist.

 

I currently have a table of references, with aspects for each as below.

 

RefAspect 1Aspect 2Aspect 3
1ABC
2B  
3CA 
4A  

 

Each ref can have multiple aspects, and the number of the aspect is largely irrelavent for my purposes, so I'd like to combine the aspects into one column. So for example I can search for all References that have an aspect of A.

 

I believe if I can format the table as below it will work in BI, but as it's a large dataset I'm not sure that a manageable solution.

 

RefAspect
1A
1B
1C
2B
3C
3A
4A

 

I'd welcome any thoughts please and let me know if you need any further explaination.

 

Many Thanks,

 

Ollie

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ODash ,

 

You can also use the unpivot feature and remove empty feature in Query Editor.

Please check the following steps.

1. Select the tree columns and click unpivot.

2.PNG

2. Click the buttom at the right of value column and click remove empty.

3.PNG

4.PNG

3. Remove the Attribute column.

5.PNG

The result would be shown as below.

6.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @ODash ,

 

You can also use the unpivot feature and remove empty feature in Query Editor.

Please check the following steps.

1. Select the tree columns and click unpivot.

2.PNG

2. Click the buttom at the right of value column and click remove empty.

3.PNG

4.PNG

3. Remove the Attribute column.

5.PNG

The result would be shown as below.

6.PNG

 

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

camargos88
Community Champion
Community Champion

Hi @ODash ,

 

You just need to unpivot the other columns.

 

Here is the code, just past on Advanced Editor on Power Query:

 

let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXIEYicgdlaK1YlWMoLyFMAYJGIMloOog4iYwHlgkVgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Ref = _t, #"Aspect 1" = _t, #"Aspect 2" = _t, #"Aspect 3" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Ref", Int64.Type}, {"Aspect 1", type text}, {"Aspect 2", type text}, {"Aspect 3", type text}}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Ref"}, "Attribute", "Value"),
#"Filtered Rows" = Table.SelectRows(#"Unpivoted Other Columns", each ([Value] <> " "))
in
#"Filtered Rows"

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors