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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JC2022
Helper III
Helper III

Record and List to Table

Hi,

Can you please help me with a json datasource. I have lists and records as shown below, but I would like to create a Table from it.

 

1. See the column data.items. It is a column with "Record" which I can expand. Some expanded columns have values (which is great), but some have Lists.1.png

 

2. data.items.id is an expanded column with values, but data.items.autoProperties is a column with "List".

2.png

 

3. I have expanded column data.items.autoProperties with "Expand to new rows". That's why there are multiple rows for data.items.id = 4 and 135 etc. Some data.items.id have more rows than others, depending on the amount of records in the list.

In data.items.autoProperties it still shows "Record".

3.png

 

4. If I expand column data.items.autoProperties to data.items.autoProperties.name and data.items.autoProperties.value this will be the result.

4.png

 

5. But I would like to have data.items.autoProperties.name als columns and data.items.autoProperties.value als the value. With only one row for a unique data.items.id. Can you guys please help me?

1 ACCEPTED SOLUTION

Make sure you select your value column for the values in your pivot and choose "Don't Aggregate".

ppm1_0-1684324844927.png

Or here is an expression you can put in a custom column. Replace Custom with your column that has your list of records (before you expand, pivot, etc.).

let 
inputlist = [Custom],
fields = List.Transform(inputlist, each _[name]),
values = List.Transform(inputlist, each _[value]),
result = Record.FromList(values, fields)
in 
result

 

Pat

 

Microsoft Employee

View solution in original post

3 REPLIES 3
ppm1
Solution Sage
Solution Sage

Starting at your last picture, you should be able to pivot on the name columns and use the value column as the values. Select the name column and choose Pivot Column on the Transform tab. Have you tried that?

 

It should also be possible to use List.Transform to turn your list of records into a record (w/o having to initially expand the list and then pivot).

 

Pat

Microsoft Employee

Hi @ppm1,

this creates values of 1 and 0, depending if there is data (1) and when there is no data (0). But not the actual data itself.

Can you write me the code of your other solution (List.Transform), because I have tried some things but it didn't work out. I was getting all errors.

 

JC2022_0-1684245403422.png

 

Make sure you select your value column for the values in your pivot and choose "Don't Aggregate".

ppm1_0-1684324844927.png

Or here is an expression you can put in a custom column. Replace Custom with your column that has your list of records (before you expand, pivot, etc.).

let 
inputlist = [Custom],
fields = List.Transform(inputlist, each _[name]),
values = List.Transform(inputlist, each _[value]),
result = Record.FromList(values, fields)
in 
result

 

Pat

 

Microsoft Employee

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors