Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Get data from dynamic columns without affecting by changes

Hi,   Im getting data using 'Expanding Custom.Data' not to specify the column name one by one to reduce errors if its data source's column names change unexpectedly.    But this one also might ha...
  • rajendraongole1's avatar
    1 year ago

    Hi Anonymous -you can use Power Query's Table.ColumnNames function. This function dynamically retrieves all column names from a table, allowing you to expand all existing columns without hardcoding them.

     

    Please check the attached pq code, hope it works