Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
srlabhe123
Post Patron
Post Patron

Merged Queries

Hi All,

I need to understand how to use merged queries so that only 1 column is used to display data from 2 tables.

For ex Table1.VendorID merged with Table2.VendorID with full outer join.

 

If I use Table1.VendorID in Table visual it would show all data from Table1 but only matching data form Table2 and other way if I select Table2.VendorID

 

How can I use vendor column in report so that all data from Table1 and Table2 is displayed irrespective data is avialble or not?

 

Any thought here please.

 

Thanks

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @srlabhe123,

Perhaps you can try to create a calculated table to union two table key column values and add custom column fields to lookup correspond field values from two tables based on the key field.
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
darentengmfs
Post Prodigy
Post Prodigy

Hi @srlabhe123 

 

Create a new column in either DAX or M.

 

Given that you name your first Vendor ID column as VendorIDTable1 and the second Vendor ID column VendorIDTable2:

 

In DAX, use this formula:

VendorID-All = IF(ISBLANK([VendorIDTable1]),[VendorIDTable2],[VendorIDTable1])

 

In M, use this formula:

VendorID-All = if [VendorIDTable1] = null then [VendorIDTable2] else [VendorIDTable1]

 

These 2 formulas should fill up the Vendor IDs.

AnkitKukreja
Super User
Super User

Hi @srlabhe123 

 

It should not be very tough to crack, please share your pbix file after deleting any pii data.

I can have a look at it and will let you know about the solution for the same.

 

Thanks,
Ankit Kukreja

LinkedIn 

If my response has successfully addressed your question or concern, I kindly request that you mark this post as resolved. Additionally, if you found my assistance helpful, a thumbs-up would be greatly appreciated.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.