cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Jonathan93 Frequent Visitor
Frequent Visitor

PBI app cannot load odata.feed with M functions in the URL

Hello,

I have built an report where the source is odata.feed with an M function in the URI (to filter requierd data before downlaoding). For example a source request like

= OData.Feed("https://services.odata.org/northwind/northwind.svc/Customers?$filter=PostalCode ge '" 
& Number.ToText(12209) &"'", null, [Implementation="2.0"])

In PBI Desktop this works. When it is published to web , you cannot update the data under settings/datasets and the PBI web side displays the following error

Query contains unsupported function. Function name: OData.Feed

As far as I have tested, the problem occurs with all M functions. By replacing Number.ToText(12209) with "12209" the PBI app has no problem and the update the request accurately.

 

Is there a way around this problem, or am I doing something wrong?

 

Kind regards

Jonathan

1 ACCEPTED SOLUTION

Accepted Solutions
Jonathan93 Frequent Visitor
Frequent Visitor

Re: PBI app cannot load odata.feed with M functions in the URL

The problem ist solved if you follow the instructions of
https://blog.crossjoin.co.uk/2018/05/03/troubleshooting-data-refresh-performance-issues-with-odata-d...
and replace the previous oData with an oData without the Entity and choose the entity and the filters afterwards.

 

Source = OData.Feed("https://api.parliament.uk/odata"),
    GovernmentOrganisation_table =
    Source{[
        Name="GovernmentOrganisation",
        Signature="table"
    ]}[Data],
    #"Filtered Rows" =
    Table.SelectRows(
        GovernmentOrganisation_table,
        each ([GroupName] = "Cabinet Office")
    )

 

Then the M functions dont collide with PBI

1 REPLY 1
Jonathan93 Frequent Visitor
Frequent Visitor

Re: PBI app cannot load odata.feed with M functions in the URL

The problem ist solved if you follow the instructions of
https://blog.crossjoin.co.uk/2018/05/03/troubleshooting-data-refresh-performance-issues-with-odata-d...
and replace the previous oData with an oData without the Entity and choose the entity and the filters afterwards.

 

Source = OData.Feed("https://api.parliament.uk/odata"),
    GovernmentOrganisation_table =
    Source{[
        Name="GovernmentOrganisation",
        Signature="table"
    ]}[Data],
    #"Filtered Rows" =
    Table.SelectRows(
        GovernmentOrganisation_table,
        each ([GroupName] = "Cabinet Office")
    )

 

Then the M functions dont collide with PBI

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

PBI Community Highlights

PBI Community Highlights

Check out what's new in the Power BI Community!

Top Ideas
Users Online
Currently online: 6 members 820 guests
Please welcome our newest community members: