We're giving away 30 tickets for FREE! Share your story, your vision, or your hustle and tell us why YOU deserve a ticket.
Apply nowWin a FREE 3 Day Ticket to FabCon Vienna. Apply now
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.