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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
CreativeSteph
Frequent Visitor

Extract Values from a list Records

I'm trying to extract the records out of a list.  I've read this but I'm still stuck...  https://community.powerbi.com/t5/Power-Query/Extract-Values-From-a-List-of-Records/td-p/2061234

 

I am trying to download NDC numbers from the FDA using the JSON code provided here...  https://open.fda.gov/data/downloads/

CreativeSteph_0-1656687047010.png

So I added a column to rename "results.drug.drugsfda.partitions" to "NDC_List" because the "." causes a problem in the code.

CreativeSteph_0-1656691396495.png

= Table.AddColumn(#"Expanded results.drug.drugsfda", "NDC_List", each [results.drug.ndc.partitions])

 

Then, I tried to get the list items out with...

=Table.AddColumn(#"Added Custom", "NDC Out", each let typeList = [NDC_List], typeCount = List.Count([NDC_List]) in Text.Combine(List.Transform(List.Numbers(0, typeCount, 1), each Record.Field(typeList{_},"/drug/ndc data")), ", "))

 

So the error says "Expression.Error: The field '/drug/ndc data' of the record wasn't found.
Details:
display_name=/drug/ndc data
file=https://download.open.fda.gov/drug/ndc/drug-ndc-0001-of-0001.json.zip
size_mb=26.48
records=133919"

 

The record in "NDC_List" looks like this 

CreativeSteph_2-1656687662511.png

How do I access that data?

 

Thanks in advance!

 

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

In your expression of Table.AddColumn you need to replace "/drug/ndc data" with "display name"

View solution in original post

2 REPLIES 2
CreativeSteph
Frequent Visitor

Thanks Vijay!  I got it working!

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

In your expression of Table.AddColumn you need to replace "/drug/ndc data" with "display name"

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.