• I'm facing a refresh issue in Power BI web service when using a dynamic url to get the data. Here is a detailed explanation.
    I'm getting data either through Web or OData Feed via the following query:
    in which element ID (*****), start date (2018-10-19T18:30:00Z) and end date (2018-10-25T00:00:00Z) are dynamic. End date is the current time, start date is current time minus 7 days and I got ca. 200 different IDs that I import from the excel file into one column in Power BI.

    I solved this by creating 3 parameters (GUID, StartTime and EndTime) and a following function:

           Source = (GUID as text, StartTime as text, EndTime as text) => let
                   Source = OData.Feed("https://dummy.com/API/Dsl/v1/Attributes(ElementId=" & GUID & ", 20Name='TimeSeriesValue')/RetrieveValuesTimeSliced(Start=" & StartTime & ",End=" & EndTime & ",TimeSpan='PT10M')")

    Finally, I invoke this custom function to a table containing actual IDs, start and end times, and get my data imported. This works like a charm in Power BI Desktop, no issues. Also refresh works in Power BI Desktop, no problem.

    However, when I publish to Power BI web service, refresh doesn't work anymore. I read many posts online, but wasn't able to find a solution for my problem.
    For example, this post: https://blog.crossjoin.co.uk/2016/08/23/web-contents-m-functions-and-dataset-refresh-errors-in-power.... Url is this example is https://data.gov.uk/api/3/action/package_search?q= which contains "?" that can be exchanged by "Query", but I'm not sure if and how could I do this for my example.
    Appreciate any help!