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 everybody, I need to work on a report that uses only the files that are in the same directory than the report itself.
How can I find or identify in PowerQuery the directory in which the report itself is (the file .pbix).
I can't find anything about this in the forum. I would like to be able to save my report in any directory, open it and refresh to show which files are in this directory. Txs by advance !
Hi @Franck69 ,
You can find the directory in the advanced editor.
For example, go to the advanced editor and check the code.
Or click the zigzag button in the first step.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Franck69,
Can you please try this approach in Power Query (Advanced Editor) of your new blank query:
let
Source = Text.FromBinary(Extension.Contents("dummy.txt")),
ReportPath = Text.Start(Source, Text.PositionOf(Source, "dummy.txt") - 1)
in
ReportPath
Hope this helps.
Hi Sahir, it seems that this tip doesn't work. Extension.Contents function doesn't exist with a commun connector.
Anything else ? This use case must be quite common.
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!
| User | Count |
|---|---|
| 11 | |
| 7 | |
| 5 | |
| 5 | |
| 3 |