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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
APQueiroz
Frequent Visitor

Function give me DataflowContainsDynamicDatasource on DataFlow, why?

Hello guys. This is my first post in the community. Forgive me if I made any mistakes in this post.

I was exploring different ways to connect to a Postgres DB. That when I create the following function

 

( Host as text, Database as text, ViewName as text ) as table =>
    let 
        Connection = PostgreSQL.Database(Host, Database),
        ViewData = Connection{[Schema = "myschema", Item = ViewName]}[Data]
    in
        ViewData

 

It works as intended on the PBI Desktop, but when I try to put it on a Dataflow, it gives me the error

 

DataflowContainsDynamicDatasource
ErrorMessageOne or more entities references a dynamic data source.
Status code: 400
Error code: DataflowContainsDynamicDatasource

 

Why does this function make this error appear? Is there a way around this problem?

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @APQueiroz 

According to your description,you use a function to connect to the data source and return an error code "ErrorMessageOne or more entities references a dynamic data source.".

Unlike Power BI Desktop it appears that PBI Service doesn't yet support a refresh of datasets which are invoked using customer functions.And this idea has been post on Power BI idea.For this ,you can refer to :
Microsoft Idea

vyueyunzhmsft_0-1687485272217.png

If you want to create a var , you can try to use the parameter if it can meet your need.For this , you can refer to :
Parameters - Power Query | Microsoft Learn

 

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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
APQueiroz
Frequent Visitor

Hello @v-yueyunzh-msft !

 

It's embarrassing that Microsoft hasn't implemented this feature yet. This impairs, on an immeasurable scale, the versatility of developments. I hope it gets done as soon as possible.

Unfortunately, this dynamic connection is crucial for me because I need to connect to multiple databases, and I cannot afford to get it done manually with parameters alone.

 

Thank you so much for the response to my question!

 

I hope you have a wonderful day,

Allan Pimentel

v-yueyunzh-msft
Community Support
Community Support

Hi , @APQueiroz 

According to your description,you use a function to connect to the data source and return an error code "ErrorMessageOne or more entities references a dynamic data source.".

Unlike Power BI Desktop it appears that PBI Service doesn't yet support a refresh of datasets which are invoked using customer functions.And this idea has been post on Power BI idea.For this ,you can refer to :
Microsoft Idea

vyueyunzhmsft_0-1687485272217.png

If you want to create a var , you can try to use the parameter if it can meet your need.For this , you can refer to :
Parameters - Power Query | Microsoft Learn

 

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.