I am loading 100s of XML files from a folder and Power Query has created a function from the first file that I had loaded. The problem is not all the XML files have similar structure. Some have nodes that don’t exist in other XML files. I can’t change the source system which generates this.
If you look at XML samples attached, 1 XML has TAN and TANREG tags missing.
Company1 (https://1drv.ms/u/s!Ah1zVsGDy0SGhKFhHwqVdavRcp78cg?e=C4VVJV)
Company2 https://1drv.ms/u/s!Ah1zVsGDy0SGhKFgrQs4GcB49pTByw?e=LX7p21
I have tried to use try catch with Table.ExpandTableColumn, but it is becoming cumbersome to maintain for so many of columns.
Is there any other way we can extract the data but as PQ to insert null automatically?
Yashwin Pamecha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.