Forum Discussion
Recently created datetime fields in Azure DevOps cause ODATA query failure - major issue
Hi. An "Unable to Connect" error is encountered when using Power BI Desktop ODATA Feed to query of Azure DevOps Work Items. Here is a simple step-by-step to illustrate the unlikely issue:
1. Create a new Work Item type in Azure DevOps (ex: 'NewObject')
2. Add a custom datetime field to the 'NewObject' work item (ex: 'NewDatetime')
3. Open Power BI Desktop, select Get Data, then select oData Feed and enter the following query for all fields:
--> https://analytics.dev.azure.com/{org}/{project}/_odata/v3.0-preview/WorkItems? &$filter=WorkItemType eq 'NewObject' <--
4. Observe that the query returns a table for the 'NewObject' work item with all fields, including NewObject.Custom_NewDatetime as a date hierarchy observable in the UI.
5. Select Get Data, then select oData Feed and enter the following query for test fields:
--> https://analytics.dev.azure.com/{org}/{project}/_odata/v3.0-preview/WorkItems? &$filter=WorkItemType eq 'Outcome' &$select=WorkItemID,Custom_NewDatetime <--
6. Observe issue described below:
When a Power BI Desktop user adds a custom date time field to an Azure Work Item, the custom field can only be returned in an oData query for all fields; because, specifying the new custom field in the oData query returns an unexpected error. This is a relatvely new issue. I can run oData queries for custom datetime fields that I created in past months, but not for for custom datetime fields created this week. The error alert is pasted here:
Details: "OData: The property 'Custom_NewDatetime' does not exist on type 'Microsoft.VisualStudio.Services.Analytics.Model.WorkItem'. Make sure to only use property names that are defined by the type or mark the type as open type."
I hope these details help illustrate the issue for clear understanding so it can be easily resolved. Thanks.
2 Replies
- v-chenwuz-msftCommunity Support
Hi caseylide ,
It seems that Power BI does not support adding custom fields. Please do the calculation on Power BI for the original OData content.
For more details, you can refer this link.
Best Regards
Community Support Team _ chenwu zhu
- caseylideFrequent Visitor
Turns out that Power BI does support ODATA query of Azure custom fields. The problem is that there is a long delay before the inner wrokings get updated appropriately. After you creat a new custom field in Azure, it can take while before the internal data model is updated to enable a successful ODATA query. I've been observing delays of up to a couple hours. However, I've seen some posts from people who have observed up to a day or two.