Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
In the table I am working on three columns, the first three are zipcodes. I want to combine all of them into one column, All ZipCodes. Union DAX syntax is not working for me. Please suggest the DAX.
Thank You
Solved! Go to Solution.
Thank You,
Instead of creating a union column we used slicer having souce from 3 columns , user below community link to get my work done.
community.powerbi.com/t5/Desktop/How-to-filter-on-multiple-columns/td-p/380232
Hi @rkumar ,
When using union() expression, you should note that:
You can create a new table to use union() expression:
All codes =
UNION(
DISTINCT('Table'[Code1]),
DISTINCT('Table'[Code2]),
DISTINCT('Table'[Code3])
)
You will get the expected result:
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi Yingjie ,
I am using only one table, need to combine data from 3 columns of this table in one column. moreover the data of this new column has to be used in slicer so new table is not feasible. Please suggest.
Thank You
Hi @rkumar ,
I'm afraid you cannot create it in one table beacuse if you want to create a new column in the same table to combine other columns, there is no value which correspond with each row as the error message said 'A table of multiple values was supplied where a single value was expected' when you create a column need to have 9 rows while the columns you want to combine just have 3 rows.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Thank You,
Instead of creating a union column we used slicer having souce from 3 columns , user below community link to get my work done.
community.powerbi.com/t5/Desktop/How-to-filter-on-multiple-columns/td-p/380232
Try
New table = union(all(table[zipcode1]),all(table[zipcode2]),all(table[zipcode3]))
Or
new table = distinct(union(all(table[zipcode1]),all(table[zipcode2]),all(table[zipcode3])))
Also try
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |