Power Query Struggle with XML

et1mark

New Member
Joined
May 21, 2021
Messages
2
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a Form fill PDF that I'm trying to extract the data from in Power Query. I'm currently using the .FDF and using acrobat to extract the data but I want to swap to XML and use Power Query to table it. However, the XML isn't populating correctly in PQ. If I try to gather data from more than one XML, the data runs off into one long massive column instead of a separate column for each file. Please watch the video below to see what I'm talking about.


What am I doing wrong???
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Your data look remarkable clean.
Try this:-
  • Once you get to having just the 2 columns, change the headings to something more manageable, say Description and Value
  • Filter on the first (Description) column if you need to. It can't have any nulls in it, so exclude nulls
  • Add a conditional column if Description = 02 Date then pull get the Date from the value column
  • In the new column Fill Down.
  • With the 1st Description column highlighted Pivot with Value being the Value column
    Expand Advanced and select don't aggregate.
  • You can delete the extra date column
  • Select all columns (ctrl+A) transform > detect data types
  • Eye ball the data types to make sure they are ok and Close & Load (to)
Hopefully I got that right, my test data was only slightly different to this.

1621691713459.png
 
Upvote 0
Solution
Your data look remarkable clean.
Try this:-
  • Once you get to having just the 2 columns, change the headings to something more manageable, say Description and Value
  • Filter on the first (Description) column if you need to. It can't have any nulls in it, so exclude nulls
  • Add a conditional column if Description = 02 Date then pull get the Date from the value column
  • In the new column Fill Down.
  • With the 1st Description column highlighted Pivot with Value being the Value column
    Expand Advanced and select don't aggregate.
  • You can delete the extra date column
  • Select all columns (ctrl+A) transform > detect data types
  • Eye ball the data types to make sure they are ok and Close & Load (to)
Hopefully I got that right, my test data was only slightly different to this.

View attachment 39231
Alex, I appreciate the compliment. And holy smokes did you just teach me some kung fu! I did have to add a second conditional column to futher separate records occurring on the same date but that worked amazingly well!
 
Upvote 0
Loved your feedback, you've made my day. Kudos to you for working out the extra steps for making the rows unique.
 
Upvote 0

Forum statistics

Threads
1,214,921
Messages
6,122,280
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top