Reputation: 2422
I am trying to turn multiple columns into one column value DAX/PowerBI.
I have a table1
with some columns name Phone No.1
, Phone No.2
, Phone No.3
, Phone No.4
, Phone No.5
, Phone No.6
and also table 2
with the columns name Phone No.1
, Phone No.2
, Phone No.3
, Phone No.4
, Phone No.5
, Phone No.6
.
Now I would like to have a table with a column of unique values from all those columns.
I have search a lot to find a solution, but unfortunately, It seems like there is no solution to this challenge!
Do anyone knows any way or any solution to solve this challenge!
Upvotes: 1
Views: 5044
Reputation: 848
Keeping it simple, you can try following in DAX (Calculated Table):
New Table =
VAR newTable =
UNION (
SUMMARIZE(table1, table1[Phone No.1]),
SUMMARIZE(table1, table1[Phone No.2]),
SUMMARIZE(table1, table1[Phone No.3]),
SUMMARIZE(table1, table1[Phone No.4]),
SUMMARIZE(table1, table1[Phone No.5]),
SUMMARIZE(table1, table1[Phone No.6]),
SUMMARIZE(table2, table1[Phone No.1]),
SUMMARIZE(table2, table1[Phone No.2]),
SUMMARIZE(table2, table1[Phone No.3]),
SUMMARIZE(table2, table1[Phone No.4]),
SUMMARIZE(table2, table1[Phone No.5]),
SUMMARIZE(table2, table1[Phone No.6])
)
RETURN
SUMMARIZE(newTable, table1[Phone No.1])
Upvotes: 3