Forum Discussion
Skip parsing blank XML
use try ... otherwise ... to provide an empty table interpretation of your xml's data in case of missing payload. It must be an empty table so it won't mess up the combine step later.
The problem is that I don't know how to create that empty XML or table for the OTHERWISE clause.
- lbendlin1 year agoSuper User
That is a secondary problem. Your primary problem is to define the layout of the flattened table you want to receive if data is present. Once you haver that you can grab the column headers and create an empty table from these.
- johnjbolduc1 year agoHelper II
Is there a good tutorial on this anywhere? I know the layout of the table I need, but don't know how/where in Powery Query to define it.
- lbendlin1 year agoSuper User
It will be the result of your flattening exercise.
I am sure you know that already but your XML is a round hole that you want to put into the Power Query square peg. One is a hierarchy, the other one is a cartesian. You have to make compromises when converting XML into a table.