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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Fossgm
Frequent Visitor

Odata Feed problem with datetime parameter

Hello Power BI Community, 

 

I'm new to the Power BI toolset and perhaps am making a rookie error. 

 

I'm trying to access an oData feed from my backend SAP system. I'm using URL :

 

HTTP://<hostname>:<port>/sap/opu/odata/sap/ZEXAMPLE6_SRV/SalesOrderSet?$filter=CustomerNumber eq '0000023710' and SalesOrganization eq '1000' and DocumentDate eq datetime'2015-08-03T00:00'

 

This URL works both in my SAP system Gateway test and in both IE and Chrome. However, in Power BI it throws a '(400) Bad Request, no data found' error. When I make a parm change to call by material instead of by datetime it works (see URL below). It also works in just the regular excel 'Get External Data' -> 'From Other Sources' -> 'From OData Data Feed'... which seem kind of odd and doesn't work for me because I want to use Power Query to normalize my data. My only conclusion is that Power BI is doing something proactive with my datetime field to correct it or I don't know some rule around datetime for oData in Power BI specifically. Any insight would be so very greatly appreciated. 

 

-Greg

 

HTTP://<hostname>:<port>/sap/opu/odata/sap/ZEXAMPLE6_SRV/SalesOrderSet?$filter=CustomerNumber eq '0000023710' and SalesOrganization eq '1000' and Material eq '0245-0041-11'

2 REPLIES 2
mllopis
Community Admin
Community Admin

Hi Fossgm,

 

Would you be able to provide a Fiddler trace so we can investigate further? Also, could you try changing your query to use a call to OData.Feed(<Your URL>, null, [ODataVersion = 3]) and see if that makes any difference in the result?

 

Thanks,
M.

Thanks M. 

 

I tried your suggestion but got the same error. My workaround is a crappy 'convert datetime to string' but I'd prefer not to do that. Here is a link to the fiddler trace. I didn't see anything in there that jumped out. 

https://www.dropbox.com/s/4m3ve1ioafrbpuz/power%20bi%20for%20salesorder%20set.saz?dl=0

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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