Search code examples
powerbipowerbi-desktoppowerbi-datasource

Split the API URL to Base, relative and Query


Issue with PowerBi service failed

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.

How to divide this url to basic , relative and query

"https://api.com/data/v1/shift & "?page=" & Number.ToText(i) & "&limit=10000"

"

My solution :

Base Url : https://api.com/data/v1/ Relative Path : shift


Solution

  • In PowerQuery replace this expression:

    Web.Contents("https://api.com/data/v1/shift" & "?page=" & Number.ToText(i) & "&limit=10000")
    

    with that one:

    Web.Contents(
        "https://api.com/data/v1",
        [
            RelativePath = "shift",
            Query =
            [
                page = Number.ToText(i),
                limit = "10000"
            ]
        ]