Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
Solved! Go to Solution.
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
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
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
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
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