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
Winnie2024
New Member

Dynamic source data for dataflow

In my case, I want to load data into Fabric data flow.Suppose the dynamic table name can be get from one metadata table.  Here is my  M language code:
 
--First get the table name 
Source = Lakehouse.Contents([]),
#"Navigation 1" = Source{[workspaceId = "12333r3r"]}[Data],
#"Navigation 2" = #"Navigation 1"{[lakehouseId = "aaefefe"]}[Data],
my_table_name = #"Navigation 2"{[Id = "est", ItemKind = "Table"]}[Data],
 
---Then get the data from the table name above
#"Navigation 4" = Source{[workspaceId = "6d9a79dc-e9bc-42f8-958b-e5e896744437"]}[Data],
#"Navigation 5" = #"Navigation 1"{[lakehouseId = "aa6082ce-3048-4bc0-aa16-80e06a37697d"]}[Data],
#"Navigation 6" = #"Navigation 2"{[Id =my_table_name , ItemKind = "Table"]}[Data]
in
#"Navigation 6"
 
 
But i got error:
 Screenshot 2024-03-29 at 17.54.53.png
 
Any idea? 
Thanks.
1 ACCEPTED SOLUTION

It worked. Thanks you for your help.

View solution in original post

4 REPLIES 4
miguel
Community Admin
Community Admin

Could you please share the full query that you have for your "get table name" query? It should yield a single scalar value. Basically a text string. If it doesn't, that's what's causing the issue in the subsequent query.

It worked. Thanks you for your help.

Hi @Winnie2024 


We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet.
In case if you have any resolution please do share that same with the community as it can be helpful to others.
Otherwise, will respond back with the more details and we will try to help.


Thank you.

v-cboorla-msft
Community Support
Community Support

Hi @Winnie2024 

 

Thanks for using Microsoft Fabric Community.

Apologies for the inconvenience.

 

If you get an Expression.Error: The key didn’t match any rows in the table in Power BI, it means that you’ve made some changes to your source file and haven’t updated them in the Power Query. 

In most cases, the error arises when the Sheet’s Name is not the same on your original and destination file.

 

For more details please refer : How to Fix “The Key Didn’t Match Any Rows in the Table”.

 

I hope this information helps. Please do let us know if you have any further questions.

 

Thanks.

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

April Fabric Community Update

Fabric Community Update - April 2024

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