Forum Discussion
Anonymous
3 years agoNot applicable
Extract PDF tables and append them but the column name & Structure is inconsistent
Hi, I am trying to extract the tables from more than 100 pdf files and wish to append the tables but facing few challenges i.e. 1. One pdf files have multiple tables 2. Column names are inconsiste...
Ehren
Microsoft Employee
3 years agoIs the data inconsistently structured in the source files? Or is Power BI extracting the data inconsistently?
If the source files themselves are inconsistent, you can write some conditional cleanup logic in M to make them consistent. For example, the following logic renames the "Owner Age" column to "Age", but only if such a column exists:
if Table.HasColumns(myTable, {"Owner Age"}) then Table.RenameColumns(myTable, {{"Owner Age", "Age"}}) else myTable