cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Laurentiu
Frequent Visitor

Lookupvalue for multiple tables

Hello everyone,

 

I'm a dynamics 365 junior developer, starting out with learning Business Central and AL and now I want to get into Power BI.

I'll get right into my problem, sorry if I make any mistakes.

 

I've got multiple tables from Business Central, among them are these : GL Entries, Vendors, Customers & Bank Accounts.

GL Entry table has a Source No. that can be completed with the code of any of the Vendor, Customer or Bank Account tables.

In my GL Entry table I want to create a new column Source Name that contains the name column from every of those other tables ( Vendor, Customer, Bank Account ).

 

Here's an example from the Customer table, my Source No. references the No column but I want to retrieve the Name column as the value instead.

Laurentiu_0-1621264406011.png

From what I know, for one column this is very easy to do with a LOOKUPVALUE that retrieves the column desired, in my case on the other hand Source No. from GL Entry is completed from 3 different tables.

How can I create a new column in GL Entry that can retrieve the Name column from 3 different tables?

I would really appreciate the help!

Also, I've already linked the GL Entry Source No. to every other No. column of the other 3 tables. I'm not sure if that is needed.

 

Thank you for your time! Have a great day!

 

1 ACCEPTED SOLUTION
v-xulin-mstf
Community Support
Community Support

Hi @Laurentiu

 

You can combine columns from three different tables into one dimensional table.

Please refer:https://docs.microsoft.com/en-us/dax/union-function-dax

 

Best Regards,
Link

 

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

2 REPLIES 2
v-xulin-mstf
Community Support
Community Support

Hi @Laurentiu

 

You can combine columns from three different tables into one dimensional table.

Please refer:https://docs.microsoft.com/en-us/dax/union-function-dax

 

Best Regards,
Link

 

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

Sorry for the late reply.

I've managed to solve this problem trough 3 table merges, expanding only the name column for each one then once again merging all the 3 columns together.

Laurentiu_0-1621860618854.png

Thanks for the response, I'll check the UNION function.

 

Have a great day!

 

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors