Forum Discussion
Check box automatically after refresh query
Hey Guys, Thanks for the support,
the problem is that those dates are titles, I select them after I merged another query to my data.
At the editor it looks like:
Table.ExpandTableColumn(#Previous Step", "Merged Data", {"KPI", "01/09/2020", "02/09/2020", "03/09/2020", "04/09/2020", "06/09/2020"}, {"KPI.1", "01/09/2020", "02/09/2020", "03/09/2020", "04/09/2020", "06/09/2020"}),
What can I write instead those static dates, to select all the NEW titles?
Thanks!
Hello Anonymous
you have to make it dynamic.
Meaning you have to analyse your column with tables and create a distinct list of all table column names, and use this list for expanding. Your new code could look something like this (not tested)
GetDistinctListColumnNames = List.Distinct(List.Combine(List.Transform(#Previous Step"[Merged Data], each Table.ColumnNames(_)))),
Expand = Table.ExpandTableColumn(#Previous Step", "Merged Data", GetDistinctListColumnNames , GetDistinctListColumnNames ),
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy