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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
dub
Frequent Visitor

How To Get Data From Multiple Tables inside one Column?

Hello everyone,

 

I am trying to solve this for a while now. If anyone can help i will be very much greatful.

 

I need to get data from multiple tables inside another table's column.

 

I tried LOOKUPVALUE() but it can take data only from one table. It somehow needs a loop which will dynamicaly choose a table and column to look at. (The column name is the same for all tables).

 

 

1 ACCEPTED SOLUTION

Hi @v-qiuyu-msft@Greg_Deckler

 

Thank you for the answers!

 

The problem is that i have much more tables involved. But i managed to get what i need by appending all the one row tables into one big table, and then use LOOKUPVALUE to pull the desired column values based on matching Ids.

 

Thank you both for your contribution.

 

BR

 

Dusan

View solution in original post

6 REPLIES 6
Greg_Deckler
Community Champion
Community Champion

Need more details on this: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

CONCATENATE?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank you Smoupre,

 

I tried thisColumn = CONCATENATE() which returns a string (in my case a table and column name) - f.ex. 'Table[Number]' - but what i need is a value.

 

SUM('thisColumn') would do the work, but it returns an error "The function SUM cannot work with value of type String".

 

Is there any function or DAX thing to get the expression of a String? Or any other Idea?

 

Thank you for your help.

 

Dusan

Greg_Deckler
Community Champion
Community Champion

VALUE will turn a string into a numeric value if possible.

https://msdn.microsoft.com/en-us/library/ee634584.aspx



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

MergedData = CONCATENATE(CONCATENATE("'";CONCATENATE([TableName];"'"));"[Number]")

 

This is my formula.

 

'TableName' is a column from current table containg names of my desired tables. Let's say table names are Table1, Table2,...Table10.

 

Basically, I need a number from the columns Table1[Number] and Table2[Number] ... and Table10[Number] - (these tables have only 1 row)

 

My formula returns a string 'Table1'[Number], 'Table2'[Number] ... 'Table10'[Number]'

 

But the formula

 

VALUE(CONCATENATE(CONCATENATE("'";CONCATENATE([Table1];"'"));"[Number]"))

 

Returns an error "Cannot convert value '''Table1'[Number] of type Text to type Number."

 

Can you understand? Or maybe i should create a pbi example file?

 

Thank you very much for your time.

 

Dusan

 

Hi @dub,

 

From your description, each table has [Number] column which has one value, you want to concatenate those column values in one table, right? 

 

In your scenario, assume Table2, Table3 and Table4 have Number column, you can try to create a calculated column in the table Table2 use DAX below: 

 

ConcatenateCol = CONCATENATE(CONCATENATE('Table2'[Number],CONCATENATE(",",MAX('Table3'[Number]))),CONCATENATE(",",MAX('Table4'[Number])))

 

Please take a look at attached pbix file. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-qiuyu-msft@Greg_Deckler

 

Thank you for the answers!

 

The problem is that i have much more tables involved. But i managed to get what i need by appending all the one row tables into one big table, and then use LOOKUPVALUE to pull the desired column values based on matching Ids.

 

Thank you both for your contribution.

 

BR

 

Dusan

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.