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
Anonymous
Not applicable

Creation of Customized report from Multiple columns from different tables

Hello,

 

I am trying to create a complex customized report from multiple columns from different tables. The expected outcome is to have the capability of selecting any column from any table and the data should display without any relationship errors.

 

For example: I tried to retrieve the following reports (only headers shown), but I am facing the relationship issues.

 

GB IDCitySub Event DateAttendeIDLast NameFirst NameFunction

 

SubEventIDGB IDSubEven DateCompany NameBill codeempidfirstnamelastnamecountryid

 

companyidempidfirstnamelastname

eventid

 

Please click here for sample data and data model created by me. Please suggest, where I went wrong? 

 

Note: In actual scenario, the data quantity is very huge and complex.

 

Appreciate any suggestions or guidance in this regard.

 

Thank you

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi

 

As tested for the first table, I find the error occurs when I add columns from table ‘Subevents’, this is because table ‘GBM’ and ‘Subevents’ have a many to many relationship and their relationship is built via the table ‘GB’. It doesn’t work when you directly use the columns from other tables. 

 

13.png

 

There are two workarounds temporarily to do this in Power BI

1. use the merge query function if you have messy data(heaps, two spreadsheets etc). That allows you to play with joining to sources of data with multiple columns.

 

    In query editor, select the query you want to see the joined data in. Click Merge Query (select the type of join you want(inner, outer, etc)) and then hold down control and select which columns you want to join from source and destination, it will show the count of hits it is making. Click okay and then select which columns you want to see in the original query.

 

2. Based on relationships built, you can also use DAX to use that column from a related table.

 

14.png

15.png

 

 

Best Regards

Maggie

View solution in original post

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi

 

As tested for the first table, I find the error occurs when I add columns from table ‘Subevents’, this is because table ‘GBM’ and ‘Subevents’ have a many to many relationship and their relationship is built via the table ‘GB’. It doesn’t work when you directly use the columns from other tables. 

 

13.png

 

There are two workarounds temporarily to do this in Power BI

1. use the merge query function if you have messy data(heaps, two spreadsheets etc). That allows you to play with joining to sources of data with multiple columns.

 

    In query editor, select the query you want to see the joined data in. Click Merge Query (select the type of join you want(inner, outer, etc)) and then hold down control and select which columns you want to join from source and destination, it will show the count of hits it is making. Click okay and then select which columns you want to see in the original query.

 

2. Based on relationships built, you can also use DAX to use that column from a related table.

 

14.png

15.png

 

 

Best Regards

Maggie

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.