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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
rmahadik
Regular Visitor

How to access table specified in column of another table ?

Hi Experts,

 

I am desiring below output. Can someone please assist how it can be achieved in power query ? or whether it is feasible or not.

There are following tables loaded.

Table1

Table2

There is Decision table having column1 column2 column3 and single row as below.

column1 - Table ID (1) (whole number)

column2 - Table1 (text) (just name of table)

column2 - Table2 (text) (just name of table)

 

What I want to achieve is to get the row count of Table list in column1 and create additional column in Decision Table with row count of each table in column1. 

 

While doing this I am getting following error as 

Expression.Error: We cannot convert the value "Table1" to type Table.

Details:

    Value=Table1

    Type=[Type]

 

This is because column1 as Table1 (text). However I want to redirect it to actual Table1 and get the row count of Table1. 

Below is the code snippet.

 

rmahadik_0-1661329526635.png

 

 

Please assist on how this can be achieved. Let me know if any more details are required around this issue.

 

3 REPLIES 3
wdx223_Daniel
Super User
Super User

Table.RowCount(Record.FieldOrDefault(#shared,#"Table Name",#table(0,{})))

@wdx223_Daniel 

 

Getting below error

 

rmahadik_0-1661334274398.png

 

What is #shared in the syntax ?

 

Table.RowCount(Record.FieldOrDefault(#shared,#"Table Name",#table(0,{})))

 

@wdx223_Daniel 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.