Forum Discussion
Skip parsing blank XML
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.
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.
- johnjbolduc1 year agoHelper II
I appreciate all of your responses, but honestly I'm no closer to understanding how to resolve this issue than when I posted the question Friday. Your short answers seem to assume that I know a lot more about Power BI/Power Query than I do.
I've looked at dozens of tutorials, example, blog posts, etc., but in all cases the XML they're using is ridiculously simple. I've found no way to expand those solutions to my much more complicated XML.
Others read the XML data from a file, which doesn't apply to my sitiuation either.
Thanks again.
- lbendlin1 year agoSuper User
Yes, there is no "Easy" button with XML like yours. You need to be able to articulate the acceptable tabular output. Then we can craft the Power Query code to get you there, and then we can also supply the code for the empty table.