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

Error trying to conect Power BI with TFS

Hi every body, 

I'm trying to connect to TFS, here is my code for the edvanced editor:

 

let
GetWorkItemIds = () =>
let
Source = Json.Document(Web.Contents("https://XXXXXX.visualstudio.com/XXXXXX/_apis/wit/wiql/a722b515-98b6-4bf7-b4a9-102c9aca1b8a")),
workItems = Source[workItems],
#"Converted to Table" = Table.FromList(workItems, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expand Ids" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id"}, {"Work Item Id"})
in
#"Expand Ids"
in
GetWorkItemIds

 

With this code I get a function, but when I click to the "invoke" button, It appears the followin error:

 

Error inesperado en la consulta 'Consulta1'. DataFormat.Error: Se encontraron caracteres adicionales al final de la entrada JSON.
Detalles:
Value=
Position=4

 

Any idea?

 

Thanks and regards

 

3 REPLIES 3
Moderator v-yuezhe-msft
Moderator

Re: Error trying to conect Power BI with TFS

@sandragocj27,

I test your function using my own JSON file, and everything works well. In your scenairo, do you get any error message when directly paste the following M codes into advanced editor of a new blank query?

let
Source = Json.Document(Web.Contents("https://XXXXXX.visualstudio.com/XXXXXX/_apis/wit/wiql/a722b515-98b6-4bf7-b4a9-102c9aca1b8a")),
workItems = Source[workItems],
#"Converted to Table" = Table.FromList(workItems, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expand Ids" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id"}, {"Work Item Id"})
in
#"Expand Ids"



Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sandragocj27 Frequent Visitor
Frequent Visitor

Re: Error trying to conect Power BI with TFS

This is the error I get:

 

Error inesperado en la consulta 'Consulta1'. DataFormat.Error: Se encontraron caracteres adicionales al final de la entrada JSON.
Detalles:
Value=
Position=4

Moderator v-yuezhe-msft
Moderator

Re: Error trying to conect Power BI with TFS

@sandragocj27,

It seems that there are extra characters in the JSON file that returned by TFS, please check my reply in this similar thread.

Regards,
Lydia

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

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (5,827)