cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DonaldHU
Regular Visitor

Upload scrambled data (PDF) via Power Query

On a daily basis, I receive a PDF report that I would like to upload via Power Query.

However, the data is not always structured the same way. After the necessary cleaning, this is where I stranded:

 

DonaldHU_0-1655303099228.png

What needs to happen is that the value in column 9 should end up in column 8 (which I currently do by mergng the 2 columns).

DonaldHU_1-1655303260632.png

And the final result should look like this ((column 2 and column 9)

 

DonaldHU_2-1655303350896.png

 

However, as the number of columns isn't always the same, this provokes errors when I get new pdf's in:

 

DonaldHU_3-1655303463004.png

DonaldHU_4-1655303523914.png

 

What is also good to know is that sometimes all data is nicely under each other (same column), sometimes it's not. And also the number of records that should be extracted from the pdf, is not always the same either (sometimes it's 1, sometimes it's 4, ...)

 

 

 

 

 

1 ACCEPTED SOLUTION
Eyelyn9
Community Support
Community Support

Hi @DonaldHU ,

 

To my knowledge, we could not smartly know where the data structure has changed.

If the original column names change, the subsequent reference steps should be manually changed accordingly.

 

For more detailed explanation, please refer to: Dealing with errors - Power Query | Microsoft Docs

Eyelyn9_0-1655703733838.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Eyelyn9
Community Support
Community Support

Hi @DonaldHU ,

 

To my knowledge, we could not smartly know where the data structure has changed.

If the original column names change, the subsequent reference steps should be manually changed accordingly.

 

For more detailed explanation, please refer to: Dealing with errors - Power Query | Microsoft Docs

Eyelyn9_0-1655703733838.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Top Kudoed Authors