![]() ![]() #"Removed Duplicates" = Table.Distinct(#"Expanded ColNames"),ĬolNames = #"Removed Duplicates" #"Expanded ColNames" = Table.ExpandListColumn(#"Select ColNames", "ColNames"), #"Removed Columns" = Table.RemoveColumns(#"Invoked Custom Function",), #"Invoked Custom Function" = Table.AddColumn(#"Removed Other Columns1", "CleanedTables", each FXClean()), When we expand the CleanedTables column, the M code in the formula bar is the following: The script used for this query can be found at the following link where we also explained the process of invoking a custom function in Power Query. Below is an example of the structure of one of the nested tables: This is achieved by clicking on the expand icon next to the column header. Each row now contains a nested table in a structured format, and we want to expand it to access the nested table structures. In the picture above, we can see a scenario that happens when we invoke a custom function. Below is the visual representation of the problem: This is the common scenario in Power Query that can happen when we merge two queries, invoke a custom function, and in many other scenarios. ![]() We will demonstrate the problem with an example of the tables that need to be expanded. In the second part of the article, we will show a more robust technique for dealing with changing structures of the nested tables. In this article, we will show how to solve a common problem of expanding nested tables or records in Power Query, when the column names of the nested objects vary in numbers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |