Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I am connected to a folter with PDFs, i receive these PDFs once a month and the structure of the PDF is not standard, sometimes the customer send me a PDF with 10 pages, sometimes with 2 pages since it's a PDF for claims so he include also photos in the PDFs.
My problem is that i want to choose a specific table from PDF which sometimes is the table 1, sometimes the table 15 so i want to dynamically choose load this table.
My final goal is to just add the PDF in the folder and the Power Query to understand in which table need to apply the rest of the steps.
So my table always in the "Column1" contains the Word "Container" so my idea is to create a flag before expand the tables which Column of the table contains this word and choose only this, but i am not able to create the flag.
"= Table.AddColumn(#"Filtered Rows", "Custom", each Table.SelectRows([Data],each ([Column1] = "Container") ))"
With the above i just filter the table that i want with this row. I also tried the below but again is not working.
"= if Table.ExpandTableColumn(#"Filtered Rows", "Custom", {"Column1"} = "Container" then 1 else 0)"
My data looks like this and the table that i want in that case is the table 12.
Hi @pbi1908
You can try the following code
Table.AddColumn(#"Filtered Rows", "Custom", each if List.Contains([Data][Column1],"Container") then 1 else 0)
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!