Question
I'm trying to use the reporting API Odata endpoint from Excel, but I'm getting a http 406 error: "Response 406.0 from Timetracker server". My coworker, who is using a different version of Excel, doesn't even see the TimeExport function option, just TimeEntryExport, and gets a different error along the lines of " Unexpected error. Cannot access a disposed object ..." etc. Can you help?
Answer
These are known issues in the latest versions of Excel and Power BI* that has already been reported to Microsoft.
Here is a related topic in Power BI.
And here is a YouTube video: Fixing OData Connection
*Please note if you receive an error in PowerBI (along the lines of ""Cannot access a disposed object ..." etc.,) you must also use the custom query provided, below.
As a workaround, please use the Advanced Query Editor in Excel or Power BI:
Enter the function invocation by hand from looking at the function definition within the Excel advanced query editor view, e.g. Replace the Odata URL described in Timetracker Reporting API for DevOps Server (on-prem) and Timetracker Reporting API for DevOps Services (cloud) with the correct one (without Implementation="2.0"):
---
let
Source = OData.Feed("Timetracker Odata url address", null, [Query=[#"api-version"="2.1"]]),
#"TimeExport_function (startDate as text, endDate as text, populateTopParentColumns as nullable logical, groupTimeByDateByUser as nullable logical, includeBillable as nullable logical) as table" = Source{[Name="TimeExport",Signature="function (startDate as text, endDate as text, populateTopParentColumns as nullable logical, groupTimeByDateByUser as nullable logical, includeBillable as nullable logical) as table"]}[Data],
#"Invoked FunctionTimeExport_function (startDate as text, endDate as text, populateTopParentColumns as nullable logical, groupTimeByDateByUser as nullable logical, includeBillable as nullable logical) as table1" = #"TimeExport_function (startDate as text, endDate as text, populateTopParentColumns as nullable logical, groupTimeByDateByUser as nullable logical, includeBillable as nullable logical) as table"("2018-01-01", "2018-12-31", null, null, null)
in
#"Invoked FunctionTimeExport_function (startDate as text, endDate as text, populateTopParentColumns as nullable logical, groupTimeByDateByUser as nullable logical, includeBillable as nullable logical) as table1"
Step1: Open Excel (the version is this example is Excel 2016) -> Data tab -> NewQuery button -> From Other Sources -> Blank Query.
Step 2: Click Advanced Editor on the top toolbar:
Step 3: Insert query above and click "Done".
Step 4: If you have not set up credentials yet, click the "Edit Credentials" button.
Step 5: Choose "Basic" selection, paste token to password, choose the first radio button and click "Connect".
Question
I'm using PowerBI and am trying to reimport the timeexport table. I want to include only one optional parameter, for example, the isbillable column setting as true, but I keep getting an error, "OData: Couldn't find a matched function import type.". This only happens when I set isbillable to true. Can you help?

Comments
0 comments
Please sign in to leave a comment.