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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
HesamMontazer
New Member

This dataset includes a dynamic data source. Since dynamic data sources aren't refreshed in the Powe

Hello,

I am trying to connect my weclapp account to powe bi services. But I get this error:

This dataset includes a dynamic data source. Since dynamic data sources aren't refreshed in the Power BI service, this dataset won't be refreshed. Learn more: https://aka.ms/dynamic-data-sources.

Please try again later or contact support. If you contact support, please provide these details.

My function is :

let
GetSalesOrders = (optional PageSize as number, optional StartDate as nullable date, optional EndDate as nullable date, optional RequiredColumns as list) =>
let
// Defaults
PageSize = if PageSize <> null then PageSize else 1000,
token = "**************",
BaseURL = "https://brandgarage.weclapp.com",

// Pagination
AllPages = List.Generate(
() => [Page = 1, Data = {}],
each not List.IsEmpty([Data]) or [Page] = 1,
each [
Data =
let
QueryParams =
if StartDate <> null and EndDate <> null then
[
pageSize = Text.From(PageSize),
sort = "-id",
page = Text.From([Page]),
#"filter=createdDate>=" = Date.ToText(StartDate, "yyyy-MM-dd"),
#"filter=createdDate<=" = Date.ToText(EndDate, "yyyy-MM-dd")
]
else if StartDate <> null then
[
pageSize = Text.From(PageSize),
sort = "-id",
page = Text.From([Page]),
#"filter=createdDate>=" = Date.ToText(StartDate, "yyyy-MM-dd")
]
else
[
pageSize = Text.From(PageSize),
sort = "-id",
page = Text.From([Page])
],

WebCall = Json.Document(
Web.Contents(
BaseURL,
[
RelativePath = "webapp/api/v1/salesOrder", // 🚨 fixed endpoint
Query = QueryParams,
Headers = [
AuthenticationToken = token,
#"Content-Type" = "application/json",
Accept = "application/json"
]
]
)
),
CurrentData = if Value.Is(WebCall[result], type list) then WebCall[result] else {WebCall[result]}
in
CurrentData,
Page = [Page] + 1
],
each [Data]
),

CombinedList = List.Combine(AllPages),
OutputTable = Table.FromList(CombinedList, Splitter.SplitByNothing(), null),

ExpandedTable =
if Table.RowCount(OutputTable) > 0 then
Table.ExpandRecordColumn(OutputTable, "Column1", Record.FieldNames(OutputTable{0}[Column1]))
else
OutputTable,

FinalTable =
if RequiredColumns <> null then
Table.SelectColumns(ExpandedTable, RequiredColumns, MissingField.Ignore)
else
ExpandedTable
in
FinalTable
in
GetSalesOrders

 

 

 

 
2 ACCEPTED SOLUTIONS
MasonMA
Community Champion
Community Champion

@HesamMontazer 

 

Your structure with RelativePath and Query is exactly the supported exception on Microsoft documents.
But you must ensure BaseURL is a literal string, not a parameterized or function-passed value

MasonMA_1-1756310274479.png

 

You may try below adjusted M code (Hardcode the BaseURL string directly inside Web.Contents instead of keeping it in a variable)

WebCall = Json.Document(
Web.Contents(
"https://brandgarage.weclapp.com", // hardcoded
[
RelativePath = "webapp/api/v1/salesOrder",
Query = QueryParams,
Headers = [
AuthenticationToken = token,
#"Content-Type" = "application/json",
Accept = "application/json"
]
]
)
),

View solution in original post

Shahid12523
Community Champion
Community Champion

Power BI Service blocks refresh for queries with dynamic URLs. Your use of Web.Contents with changing query parameters (like StartDate, EndDate, Page) makes the source dynamic.
Fix:
Make the URL structure static by keeping the same field names in the Query record, even if some values are null. That way, Power BI can validate the source at design time.

Shahed Shaikh

View solution in original post

5 REPLIES 5
v-hjannapu
Community Support
Community Support

Hi @HesamMontazer,

I would also take a moment to thank @Shahid12523 @MasonMA  for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.

Regards,
Harshitha.

Hi @HesamMontazer,
I hope the above details help you fix the issue. If you still have any questions or need more help, feel free to reach out. We are always here to support you.


Regards,
Harshitha.

Hi @HesamMontazer,

I wanted to follow up and see if you have had a chance to review the information that was shared. If you have any additional questions or need further clarification, please don’t hesitate to reach out. I am here to assist with any concerns you might have.

Regards,
Harshitha.

Shahid12523
Community Champion
Community Champion

Power BI Service blocks refresh for queries with dynamic URLs. Your use of Web.Contents with changing query parameters (like StartDate, EndDate, Page) makes the source dynamic.
Fix:
Make the URL structure static by keeping the same field names in the Query record, even if some values are null. That way, Power BI can validate the source at design time.

Shahed Shaikh
MasonMA
Community Champion
Community Champion

@HesamMontazer 

 

Your structure with RelativePath and Query is exactly the supported exception on Microsoft documents.
But you must ensure BaseURL is a literal string, not a parameterized or function-passed value

MasonMA_1-1756310274479.png

 

You may try below adjusted M code (Hardcode the BaseURL string directly inside Web.Contents instead of keeping it in a variable)

WebCall = Json.Document(
Web.Contents(
"https://brandgarage.weclapp.com", // hardcoded
[
RelativePath = "webapp/api/v1/salesOrder",
Query = QueryParams,
Headers = [
AuthenticationToken = token,
#"Content-Type" = "application/json",
Accept = "application/json"
]
]
)
),

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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