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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Unable to refresh Dynamic Data Sources from CRM

I have a report that is connecting to Dynamics CRM using the M query below. Works fine in the desktop but will not refresh on the service. New to M query and connecting to Dynamics CRM this way. Any assistance would be appreciated!! 

 

 

let
crmUrl = "https://xxxxxxx.api.crm9.dynamics.com/api/data/v9.2/",
Source = "reports(bbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbb)?$select=bodybinary",
odataReply = Json.Document(Web.Contents(crmUrl & Source)),
textfile = Text.FromBinary(Binary.FromText(odataReply[bodybinary])),
functionText = List.Skip(Text.Split(textfile, "///")),
functionNames = List.Transform(functionText, each Text.Trim(Text.BeforeDelimiter(_, "#(cr)#(lf)")) ),
functionEvaluate = List.Transform(functionText, each Expression.Evaluate(Text.Insert(_,0,"// "), #shared)),
Custom1 = Record.FromList(functionEvaluate, functionNames),
crmGetEntityView = Custom1[crmGetEntityView],
getView = crmGetEntityView("Purchase Request")("*MyViews*>PBI - Active Obligations")
in
getView

3 REPLIES 3
Anonymous
Not applicable

@Anonymous 

1. You can use the following methods to determine whether your data source supports refreshing in Power bi:

https://docs.microsoft.com/en-us/power-bi/connect-data/service-admin-troubleshoot-unsupported-data-source-for-refresh

https://docs.microsoft.com/en-us/power-bi/connect-data/refresh-data#refresh-and-dynamic-data-sources

If the display does not work, you can try to solve it through the following two links:

 

Setting a scheduled refresh on a Dynamic Data Source in Power BI | by dataninja | DataDrivenInvestor

https://blog.crossjoin.co.uk/2016/08/16/using-the-relativepath-and-query-options-with-web-contents-in-power-query-and-power-bi-m-code/

2. Custom functions and query parameter not support in power bi service. If your source table contains above features, you can't enable refresh features on power bi service

For normal functions(remove column, filter records, add custom column, unpivot columns...), they all works on power bi service.

 

For more details, please refer to the following post:

https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power-bi/

https://community.powerbi.com/t5/Service/Unable-to-refresh-Dynamic-Data-Sources/m-p/1867648

 

 

Best Regards,

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

Greg_Deckler
Community Champion
Community Champion

@Anonymous Are you getting an error in the Service or ?

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Getting an error in the Service. Works fine in Desktop.

 

You can't schedule refresh for this dataset because the following data sources currently don't support refresh:

  • Data source for Query1

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors