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

Dynamicaly pull data from other tables based on a field value


I have a table Combine and tables Table 1, Table 2, Table 3, ... Table 10.


Each of the tables Table 1, ... Table 10 has one row with multiple columns. Lets say on of the columns is Table1[Id] and the other is Table1[Number].


The table Combine has a column Combine[Id], which is a list of Ids from Table1,...Table 10.


Now i need to create a new column Combine[Values] which will dynamicaly pull the data from Table 1[Number]...Table 10[Number] into the column Combine[Values] based on the matching Ids.



F.ex.


If,


Table1[Id]=1 and Table1[Number]=111

Table2[Id]=2 and Table2[Number]=222


Table Combine should look like:


ID  Value

1    111

2    222


Can anyone help, please?

Thank you very much.

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-yulgu-msft
Microsoft

Re: Dynamicaly pull data from other tables based on a field value

Hi @dub,

 

After loading all these tables (Combine, Table1, Table2,...Table10) into Power BI desktop, you should first Append tables from Table1 to Table10 in Query Editor mode. Suppose the new appended table is called Table11, then, in report view mode, you can use LookUpValue function to  create a new calculated column Combine[Values] in Combine Table.

 

Values=LOOKUPVALUE(Table11[Number], Table11[Id], Combine[Id])

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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
Microsoft v-yulgu-msft
Microsoft

Re: Dynamicaly pull data from other tables based on a field value

Hi @dub,

 

After loading all these tables (Combine, Table1, Table2,...Table10) into Power BI desktop, you should first Append tables from Table1 to Table10 in Query Editor mode. Suppose the new appended table is called Table11, then, in report view mode, you can use LookUpValue function to  create a new calculated column Combine[Values] in Combine Table.

 

Values=LOOKUPVALUE(Table11[Number], Table11[Id], Combine[Id])

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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

dub Frequent Visitor
Frequent Visitor

Re: Dynamicaly pull data from other tables based on a field value

Thanks. It did the work 🙂

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors