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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dearears
Helper I
Helper I

Create a table with unique list

Hi Forum,

 

I have this table

Mat DescMaterial NumberSubMat1SubMat2SubMat3SubMat4SubMat5
xxx103842390065821003623114380563843090505null
xxx103842390065824375805010036231139005639null
xxx10384244058607nullnullnullnull
xxx103842390065824375805010036231039005637null
xxx1038423900658210036231139005638nullnull
xxx1038423900658243676069nullnullnull
xxx103842390065821003623114380563841162738null
xxx1038423900658210036231143676069nullnull
xxx103842390065824375805010036231040715734null
xxx103842390065821003623114380563840221880null
xxx10384239006582437580501003623103900666039006921

 

from which i would like to create another table

 

Mat DescMaterial NumberSub Components
xxx 103842All unique subcomponents from columns SubMat1 - SubMat5
  ..
  ..

 

Could some one help me with this.

 

Thanks in advance.

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

You should unpivot your data to make this easier. In the query editor, select the first two columns, right click on them, and choose unpivot other columns. Once you load that table, you can use a measure with CONCATENATEX() to combine the values for each material in a table visual.

 

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

2 REPLIES 2
mahoneypat
Employee
Employee

You should unpivot your data to make this easier. In the query editor, select the first two columns, right click on them, and choose unpivot other columns. Once you load that table, you can use a measure with CONCATENATEX() to combine the values for each material in a table visual.

 

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


Thanks Pat ! I am nearly there.

 

The table I see now is

 

Mat DescMat NumberAttributeValue
xxx123Sub Nameyyyyy
xxx123Sub Number3456
xxx123Sub TypeType 1

 

How do it convert this to.

 

Mat DescMat NumberSub NameSub NumberSub Type
     

 

TIA.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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