Forum Discussion
Dynamic column changes handler
- 3 years ago
Right, that's why I was thinking of dynamically getting a column count each day. You would essentially be creating dynamic M that adjusts to the number of columns available on any given day.
I did some research and found the links below. The first link seems like the simplest approach, which is to merge all columns using a delimiter, and then split the column by that delimiter.
https://www.youtube.com/watch?v=dYXVTAIOcw0
The example below uses the parameter MissingField.Ignore. I guess you could list the maximum number of columns you might have, and then this parameter would cause any non-existent columns to be ignored.
https://www.mrexcel.com/board/threads/powerquery-pdf-file-with-varying-number-of-columns.1218981/
Hi DataInsights, thanks for this insight! The main issue with this is that I do not know all the columns that exist currently, the API connector I'm using seems to be very limited in that it will only return data (daily) for that day, the next day will then have more or less different columns and when that change happens it then fails.
Right, that's why I was thinking of dynamically getting a column count each day. You would essentially be creating dynamic M that adjusts to the number of columns available on any given day.
I did some research and found the links below. The first link seems like the simplest approach, which is to merge all columns using a delimiter, and then split the column by that delimiter.
https://www.youtube.com/watch?v=dYXVTAIOcw0
The example below uses the parameter MissingField.Ignore. I guess you could list the maximum number of columns you might have, and then this parameter would cause any non-existent columns to be ignored.
https://www.mrexcel.com/board/threads/powerquery-pdf-file-with-varying-number-of-columns.1218981/