Forum Discussion
vijaykaali811
Helper I
1 year agoextract particular value from list record column in power query
i have column additionaldata as list type , that list contains key value records like "OS" :rhel , "version","rhel8 like that . without expanding all list and record as it is creating duplicate re...
- 1 year ago
To get a specific item from a list without expanding it, you can use access the position of an item - which always begins at zero. Assuming List of Records is the name of the list column, you can create a custom column with this formula
[List of Records]{0} // This retrieves the first record from the "List of Records" column[List of Records]{0}[OS] // This accesses the value associated with the "OS" key in the first record of the "List of Records" columnSample query:
let Source = Table.FromRecords({ [ID = 1, List of Records = { [OS = "rhel"], [version = "rhel8"], [Arch = "x86_64"] }], [ID = 2, List of Records = { [OS = "ubuntu"], [version = "20.04"], [Arch = "arm64"] }], [ID = 3, List of Records = { [OS = "centos"], [version = "7"], [Arch = "x86_64"] }] }), #"Added Custom" = Table.AddColumn(Source, "OS", each [List of Records]{0}[OS]), OS = #"Added Custom"{1}[OS] in OS
Ritaf1983
Super User
1 year agoPlease provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523