Forum Discussion

val21bergman's avatar
val21bergman
Icon for Microsoft Employee rankMicrosoft Employee
6 years ago

Append an id column with the Table.FromList command

I am importing JSON data to PBI.  I am using developer.marvel.com API calls to get character, comic, series, story, and event data.  I have successfully extracted List fields to tables and split the columns from my JSON files to get my tables.  However, my character JSON file holds collections of all relationships between character and the other objects.  I was trying to, through query editor, create new relationship tables to include the character id and the comic id as one relationship table, character id and series id as another relationship table, etc.

 

I know I can use the Table.FromList syntax in Power Query to extract a new table with all of the list details for each column already in the character table, which would work if I could also somehow add a column to preserve from which character id the related list was extracted.   However, I cannot figure out the syntax to both create the table from the list and define an additional calculated column as the characterid.  Thoughts?  

 

3 Replies