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
dub
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
v-yulgu-msft
Employee
Employee

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
v-yulgu-msft
Employee
Employee

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.

Thanks. It did the work 🙂

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.