Forum Discussion
Anonymous
7 years agoNot applicable
Merging of Columns
Hi All, I am trying to merge columns from different queries (used four queries) in Power BI Desktop using Manage Relationship by Many to Many Cardinality. But, could find that only common data ca...
- Anonymous7 years ago
Hi Eads,
Found the solution for merging columns from different queries having different number of columns.
Below is the code:
TABLE = DISTINCT( UNION ( SELECTCOLUMNS(TABLE1,"COLUMN",TABLE1[COLUMN]), SELECTCOLUMNS(TABLE2,"COLUMN",TABLE2[COLUMN]) ) )After giving the code, need to manage relationships using all queries by Many to Many Cardinality.
If this post helps, then please consider Accept it as the solution to help the others to find it more quickly.
Regards,
Vineetha.
v-eachen-msft
7 years agoCommunity Support
Hi Anonymous ,
You need to create a new table with Union() function to be a slicer.
SlicerTable = DISTINCT ( UNION ( AR, cc, Inventory, 'Sales CC' ) )
Then create relationships with other four tables. The relationships must be active ones.
Now you can create your reports.
Best Regards,
Eads
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.