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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Faranak_Zagia
Advocate I
Advocate I

Product IDs

Hi everyone,

I am new to Power BI and I have a table with 4 columns, each containing product IDs. How can I extract all unique product IDs from these columns into one list?


Column 1 (Product IDs) Column 2 (Product IDs) Column 3 (Product IDs) Column 4 (Product IDs)
P001 P010 P020 P030
P002 P011 P021 P031
P003 P012 P022 P032
P004 P013 P023 P033

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

pls try this

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("NY2xDQAwCMN+Ye4ASQ/pjvj/jVakTFZkS8m04x62HsIbEOhWqy1kFUFgjKWsIgjE2N37H0AtaVUX", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
    Custom1 = List.Union( Table.ToColumns( Source))
in
    Custom1

View solution in original post

Omid_Motamedise
Super User
Super User

Consider your table as a Source, then use the next formula.

 

List.Union(Table.ToRows(Source))

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h

View solution in original post

3 REPLIES 3
Omid_Motamedise
Super User
Super User

Consider your table as a Source, then use the next formula.

 

List.Union(Table.ToRows(Source))

If my answer helped solve your issue, please consider marking it as the accepted solution. It helps others in the community find answers faster—and keeps the community growing stronger!
You can also check out my YouTube channel for tutorials, tips, and real-world solutions in Power Query with the following link
https://youtube.com/@omidbi?si=96Bo-ZsSwOx0Z36h
Ahmedx
Super User
Super User

pls try this

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("NY2xDQAwCMN+Ye4ASQ/pjvj/jVakTFZkS8m04x62HsIbEOhWqy1kFUFgjKWsIgjE2N37H0AtaVUX", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t]),
    Custom1 = List.Union( Table.ToColumns( Source))
in
    Custom1
Anonymous
Not applicable

= List.Union({Table1[ProductID], Table2[ProductID], Table3[ProductID], Table4[ProductID]})

 

--Nate

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.