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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
asdfasdfoijdasf
Frequent Visitor

One or more tables references a dynamic data source with AzureStorage.DataLake

I'm trying to set up a custom function that dynamically changes the source of my query. Upon saving I get the error 'One or more tables references a dynamic data source'.

Looking for answers online I got the impression there might be some workarounds possible if you are using the Web.Contents function in combination with the RelativePath and Query arguments (although I may be misunderstanding this).

Is there a workaround to available when the AzureStorage.DataLake function is used?

 

(ADLSPathToLoadFrom) => let   
Source = AzureStorage.DataLake(ADLSPathToLoadFrom),
...
...
2 REPLIES 2
asdfasdfoijdasf
Frequent Visitor

Thanks for your response, @johnbasha33. When I save query you suggest (GetDataFromADLS), I still get the message 'One or more tables references a dynamic data source'. What am I doing wrong?

johnbasha33
Super User
Super User

@asdfasdfoijdasf 

When using the AzureStorage.DataLake function in Power Query, the data source is considered dynamic, meaning it cannot be used within custom functions or parameterized queries directly.

However, you can work around this limitation by creating a function that accepts the ADLS path as a parameter and then using the function in your query. Here's how you can do it:

  1. Create a new blank query and define your custom function. This function will accept the ADLS path as a parameter and return the data from that path.
    GetDataFromADLS = (ADLSPathToLoadFrom as text) as table =>
    let
    Source = AzureStorage.DataLake(ADLSPathToLoadFrom)
    in
    Source

    Create another query where you call the custom function with the desired ADLS path.

    let
    ADLSPath = "your/ADLS/path/here",
    Source = GetDataFromADLS(ADLSPath)
    in
    Source

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!


Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors