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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jcawley
Helper III
Helper III

API List Function Assistance

Good afternoon all,

So I need help configuring a table referencing my API… I cannot get a list of elements to populate! I am receiving the following error:

"Expression.Error: We cannot convert a value of type Record to type Text.
Details:
Value=
379662=379662
396454=396454
396455=396455" ... etc etc

I believe I need to insert a List function (perhaps List.Distinct?), but I am not sure where to plug that into. I'm thinking perhaps part of Table.Transform. Anyhow, the API looks like this:

cap4.JPG

The function I am using looks like:

cap5.JPG

 

And the table:

yoyo.JPG

Any help would be greatly appreciated!

2 REPLIES 2
v-rzhou-msft
Community Support
Community Support

Hi @jcawley 

I found some blogs and I hope they could help you solve your problem.

Blog1: Expression.Error: We cannot convert a value of type Table to type List

Blog2: Expression.Error: We cannot convert a value of type Record to type Text - source is List of records

Blog3: Expression.Error: We cannot convert a value of type Record to type Text.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

mahoneypat
Employee
Employee

What happens if you hard code that product # (that looks like a date?) into the url and run that M code as a query instead of a function, so you can see which step causes the error?  I am curious why you are using Record.ToTable, and suspect that is it.  Typically with REST API JSON responses such a step (and the transpose step) is not needed. 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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