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.
I have two tables that have no unique key to them.
I have to merge two columns together to get a unique composite key that I can use to join them on.
Is it more efficient for PBI if I do the creation of the new column in PowerQuery or after the data is loaded and do it in DAX as a calculated column there?
Solved! Go to Solution.
Hi @OneWithQuestion ,
Maybe Union() function can help achieve this:
See my 2 sample tables below:
Then using below dax expression to create a new table with a unique key:
new table = UNION(DISTINCT('Table'[Category]),DISTINCT('Table 1'[Category]))
And you will get a new table as below:
See attached for my sample .pbix file.Hope this is what you need.
Hi @OneWithQuestion ,
Maybe Union() function can help achieve this:
See my 2 sample tables below:
Then using below dax expression to create a new table with a unique key:
new table = UNION(DISTINCT('Table'[Category]),DISTINCT('Table 1'[Category]))
And you will get a new table as below:
See attached for my sample .pbix file.Hope this is what you need.
@OneWithQuestion - Probably Power Query but doubt it will matter that much unless you are talking tens of millions of rows.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
83 | |
70 | |
61 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |