Forum Discussion
Record and List to Table
- 3 years ago
Make sure you select your value column for the values in your pivot and choose "Don't Aggregate".
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 resultPat
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
- JC20223 years agoHelper III
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.
- ppm13 years agoSolution Sage
Make sure you select your value column for the values in your pivot and choose "Don't Aggregate".
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 resultPat