Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
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 can be filtered in report.
Columns from Different Queries and Slicer
Please check the screenshot where I am not able to filter CC Field using slicer.
Kindly, suggest me some solution.
Regards,
Vineetha
Solved! Go to Solution.
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.
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.
Hi @Anonymous ,
I am glad that you found the right solution for your question.
Best Regards,
Eads
If my previous post helps, then please consider Accept it as the solution to help the others to find it more quickly.
Hi Eads,
This solution works only for queries haivng equal no of columns but not in other case.
Kinldy let mw know, if theres a way to achieve this.
Regards,
Vineetha
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |