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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
FlowViz
Helper III
Helper III

OData - We cannot convert the value null to type Text

Hi guys,

 

I have a .pbit that connects to Azure DevOps/Azure DevOps Server, which asks for the following details:

 

AzDO Services Login.png

 

 

 

 

 

 

 

 

I want to have Project field as optional, so if users leave it blank they can get data for all the projects in the organization, however when leaving it blank they get the following error.

 

Screenshot 2021-04-12 at 21.58.38.png

 

 

 

 

The query is:

 

= OData.Feed(#"Http/Https" & "://" & #"Analytics URL/Azure DevOps Server" & "/" & Organization & "/" & Project & "/_odata/v3.0-preview/WorkItems?%20$filter=WorkItemType%20ne%20%27Issue%27%20and%20WorkItemType%20ne%20%27Task%27%20and%20WorkItemType%20ne%20%27Test%20Case%27%20and%20WorkItemType%20ne%20%27Test%20Plan%27%20and%20WorkItemType%20ne%20%27Shared%20Parameter%27%20and%20WorkItemType%20ne%20%27Shared%20Steps%27%20and%20WorkItemType%20ne%20%27Test%20Suite%27%20and%20WorkItemType%20ne%20%27Impediment%27%20and%20State%20ne%20%27Removed%27%20&$select=AreaSK,CompletedDate,CompletedDateSK,CycleTimeDays,IterationSK,LeadTimeDays,ParentWorkItemID,State,StateCategory,TagNames,Title,WorkItemID,WorkItemType&$expand=Iteration($select=IterationName,IterationPath,StartDate,EndDate)", null, [Implementation="2.0"])

 

 

Is there any way around this to get it working?

2 ACCEPTED SOLUTIONS
mahoneypat
Microsoft Employee
Microsoft Employee

Two potential approaches

 

1.  You start with a table of all Project names and then make the web call on each row, using the Project value on that row.  Prior to that step, you could have a Filter step that filters to the selected project (or null if not selected and no projects are filtered out. You could then expand the resulting tables to have your combined project data.

 

2.  If you can make a web call for all projects, you could have an if Project = null then OData.Feed( ) else OData.Feed()  with two different Odata calls.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

v-yingjl
Community Support
Community Support

Hi @FlowViz ,

Based on the error message, there have 'null' values in your data source which could not be converted to text type.

'null' value and blank value are different, refer: https://www.excelguru.ca/blog/2018/10/04/nuthin-aint-nuthin-in-power-query/ 

Please check your data type which includes 'null' value and replace values before you convert it to text type.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @FlowViz ,

Based on the error message, there have 'null' values in your data source which could not be converted to text type.

'null' value and blank value are different, refer: https://www.excelguru.ca/blog/2018/10/04/nuthin-aint-nuthin-in-power-query/ 

Please check your data type which includes 'null' value and replace values before you convert it to text type.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

mahoneypat
Microsoft Employee
Microsoft Employee

Two potential approaches

 

1.  You start with a table of all Project names and then make the web call on each row, using the Project value on that row.  Prior to that step, you could have a Filter step that filters to the selected project (or null if not selected and no projects are filtered out. You could then expand the resulting tables to have your combined project data.

 

2.  If you can make a web call for all projects, you could have an if Project = null then OData.Feed( ) else OData.Feed()  with two different Odata calls.

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors