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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Z_BI
Frequent Visitor

Request to Business Central and union more tables

Hi community, 

I'm working on a report with several query. 

One of this query make 1 request to Business Central (by O.Data) for each company and in the next step add a custom column. In total 4 company.

I would like to have one request including all 4 tables (which have the same data structure).

 

Z_BI_0-1688378436932.png

 

Obviously the problem is the amount of time it takes to update it.

Please help me

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

Hi @Z_BI ,

According to your description, if you want to union the 4 tables in a vertical orientation, add a step:

#"Appended Query" = Table.Combine({VENDORLEDGSR1, VENDORLEDGSR2,VENDORLEDGSR3,VENDORLEDGSR4})

If you want to union the 4 tables in a horizontal orientation, add three steps:

#"Merged Queries" = Table.NestedJoin(VENDORLEDGSR1, {"Name"}, VENDORLEDGSR2, {"Name"}, "VENDORLEDGSR2", JoinKind.LeftOuter),
#"Merged Queries1" = Table.NestedJoin(#"Merged Queries", {"Name"}, VENDORLEDGSR3, {"Name"}, "VENDORLEDGSR3", JoinKind.LeftOuter),
#"Merged Queries2" = Table.NestedJoin(#"Merged Queries1", {"Name"}, #"Appended Query", {"Name"}, "VENDORLEDGSR4", JoinKind.LeftOuter)

Then expand the columns.

vyanjiangmsft_0-1688536785017.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @Z_BI ,

According to your description, if you want to union the 4 tables in a vertical orientation, add a step:

#"Appended Query" = Table.Combine({VENDORLEDGSR1, VENDORLEDGSR2,VENDORLEDGSR3,VENDORLEDGSR4})

If you want to union the 4 tables in a horizontal orientation, add three steps:

#"Merged Queries" = Table.NestedJoin(VENDORLEDGSR1, {"Name"}, VENDORLEDGSR2, {"Name"}, "VENDORLEDGSR2", JoinKind.LeftOuter),
#"Merged Queries1" = Table.NestedJoin(#"Merged Queries", {"Name"}, VENDORLEDGSR3, {"Name"}, "VENDORLEDGSR3", JoinKind.LeftOuter),
#"Merged Queries2" = Table.NestedJoin(#"Merged Queries1", {"Name"}, #"Appended Query", {"Name"}, "VENDORLEDGSR4", JoinKind.LeftOuter)

Then expand the columns.

vyanjiangmsft_0-1688536785017.png

I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Kudoed Authors