Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Guys,
i have the code like here to create a string query called: Bundles_Path
= fnGetPath("BUNDLES_PATH_TEST")
- this is my function with argument refrencing to windows environment.
Function is:
let
GetPath = (envVariable as text) =>
let
Source = Python.Execute("
import os
import pandas as pd
env_value = os.getenv('" & envVariable & "')
data = [[env_value]]
df = pd.DataFrame(data, columns=['Path'])
"),
df1 = Source{[Name="df"]}[Value],
Path = df1{0}[Path]
in
Path
in
GetPath
It is working and I am getting String as path.
Now when I am refering to folder as created string query and creating new query "Derived":
= Folder.Files(Bundles_Path)
I am getting :
Formula.Firewall: Query 'Derived' (step 'Source') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination.
How to avoid this error?Putting this value into parameter will solve it?
Best,
Jacek
Solved! Go to Solution.
Hi @jaryszek ,
Thanks for reaching out to Microsoft Fabric Community Forum.
@lbendlin Thanks for your prompt response. In addition to that :
Yes, you can create a parameter to pass the path to the code as below.
function :
let
GetPath = (envVariable as text) =>
let
Source = Python.Execute("
import os
import pandas as pd
env_value = os.getenv('" & envVariable & "')
data = [[env_value]]
df = pd.DataFrame(data, columns=['Path'])
"),
df1 = Source{[Name="df"]}[Value],
Path = df1{0}[Path]
in
Path
in
GetPath= Folder.Files(BUNDLES_PATH_TEST)
Using Folder.Files(BUNDLES_PATH_TEST) function will help in fetching the information from above path.
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
Hi @jaryszek ,
Thanks for reaching out to Microsoft Fabric Community Forum.
@lbendlin Thanks for your prompt response. In addition to that :
Yes, you can create a parameter to pass the path to the code as below.
function :
let
GetPath = (envVariable as text) =>
let
Source = Python.Execute("
import os
import pandas as pd
env_value = os.getenv('" & envVariable & "')
data = [[env_value]]
df = pd.DataFrame(data, columns=['Path'])
"),
df1 = Source{[Name="df"]}[Value],
Path = df1{0}[Path]
in
Path
in
GetPath= Folder.Files(BUNDLES_PATH_TEST)
Using Folder.Files(BUNDLES_PATH_TEST) function will help in fetching the information from above path.
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
inline your function to keep everything in the same partition.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |