Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
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
Consider your table as a Source, then use the next formula.
List.Union(Table.ToRows(Source))
Consider your table as a Source, then use the next formula.
List.Union(Table.ToRows(Source))
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
= List.Union({Table1[ProductID], Table2[ProductID], Table3[ProductID], Table4[ProductID]})
--Nate
User | Count |
---|---|
11 | |
7 | |
5 | |
5 | |
4 |
User | Count |
---|---|
16 | |
14 | |
8 | |
6 | |
6 |