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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Facing issue in PBI Serivce Dataset of Azure Monitor, Power Query M, Relative Path issue.

I am getting, error in datasource setting, when I deployed report at Power BI Service, as "You can't schedule refresh for this dataset because the following data sources currently don't support refresh: Data source for Query1 Discover Data Sources"

 

I am getting this error, w.r.t. data source which is querying Azure-Monitor Log.

let me give you some more info.

 

  1. I have kept one excel file at Sharepoint  (two columns, Customer Name, and their Azure Subscription ID) that is first datasource in report, which may NOT be cause of issue.
  2. I exported M query from Azure Monitor, made it as Power Query Function, which takes Subscription ID as argument.
  3. This works fine locally, but when deployed on PBI Service it gives issue, on internet blogs, people suggest using [RelativePath], but if I try to use it in M code (given by Azure Monitor query export), it fails.

If I try to use relative path, query is syntactically error out.

I am not expert, so not sure how to proceed ?

Please find my parameterized M code (without relative path) below. It works locally but not on PBI Service. 

==============================================

let

    Source = (SubscriptionId as any) => let AnalyticsQuery =

let Source = Json.Document(Web.Contents(https://api.loganalytics.io/v1/subscriptions/&SubscriptionId&"/query",

[Query=[#"query"="Event

| where Source == ""MyTasksService"" or Source ==""Service Control Manager""

| where RenderedDescription contains ""XYZ"" and RenderedDescription contains ""stopped""

| order by TimeGenerated asc

| project TimeGenerated, Computer, RenderedDescription, _SubscriptionId

 

",#"x-ms-app"="AzureFirstPBI",#"timespan"="P1D",#"scope"="hierarchy",#"prefer"="ai.response-thinning=true"],Timeout=#duration(0,0,4,0)])),

TypeMap = #table(

{ "AnalyticsTypes", "Type" },

{

{ "string",   Text.Type },

{ "int",      Int32.Type },

{ "long",     Int64.Type },

{ "real",     Double.Type },

{ "timespan", Duration.Type },

{ "datetime", DateTimeZone.Type },

{ "bool",     Logical.Type },

{ "guid",     Text.Type },

{ "dynamic",  Text.Type }

}),

DataTable = Source[tables]{0},

Columns = Table.FromRecords(DataTable[columns]),

ColumnsWithType = Table.Join(Columns, {"type"}, TypeMap , {"AnalyticsTypes"}),

Rows = Table.FromRows(DataTable[rows], Columns[name]),

Table = Table.TransformColumnTypes(Rows, Table.ToList(ColumnsWithType, (c) => { c{0}, c{3}}))

in

Table

in AnalyticsQuery

in

    Source

==========================================================

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Can you share how did you generate the relative path for it?

 

Regards,
Community Support Team _ Jing

Anonymous
Not applicable

let
Source = (SubscriptionId as any) => let AnalyticsQuery =
let Source = Json.Document(Web.Contents("https://api.loganalytics.io/v1/subscriptions" ,[RelativePath = "/"&SubscriptionId&"/query",
Query=[#"query"="Event
| where Source == ""XYZ"" 
| where RenderedDescription contains ""ABC"" and RenderedDescription contains ""stopped""
| order by TimeGenerated asc
| project TimeGenerated, Computer, RenderedDescription, _SubscriptionId

",#"x-ms-app"="AzureFirstPBI",#"timespan"="P1D",#"scope"="hierarchy",#"prefer"="ai.response-thinning=true"],Timeout=#duration(0,0,4,0)])),
TypeMap = #table(
{ "AnalyticsTypes", "Type" },
{
{ "string", Text.Type },
{ "int", Int32.Type },
{ "long", Int64.Type },
{ "real", Double.Type },
{ "timespan", Duration.Type },
{ "datetime", DateTimeZone.Type },
{ "bool", Logical.Type },
{ "guid", Text.Type },
{ "dynamic", Text.Type }
}),
DataTable = Source[tables]{0},
Columns = Table.FromRecords(DataTable[columns]),
ColumnsWithType = Table.Join(Columns, {"type"}, TypeMap , {"AnalyticsTypes"}),
Rows = Table.FromRows(DataTable[rows], Columns[name]),
Table = Table.TransformColumnTypes(Rows, Table.ToList(ColumnsWithType, (c) => { c{0}, c{3}}))
in
Table
in AnalyticsQuery
in
Source

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.