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.
Hello, All!
Could someone know if I can pass a dataset to python script as a parameter to do some logic on it?
So the single M query would follow this structure:
[Get some data with standart M] -> [Python.Execute (... pass dataset)] -> [get result dataset]
Thanks in advance for any ideas!
Solved! Go to Solution.
hi, @KostyaRico
You could get it in power bi Edit Queries:
https://docs.microsoft.com/en-us/power-bi/desktop-python-in-query-editor
Best Regards,
Lin
Hi I am just wondering if you ever figured out how to pass the previous step (a column or table) into the python.execute() command as a parameter. As far as I can tell this isn't covered in the accepted answer.
This functionality would be extremely helpful to do custom transformation steps using pandas.
hi, @KostyaRico
You could get it in power bi Edit Queries:
https://docs.microsoft.com/en-us/power-bi/desktop-python-in-query-editor
Best Regards,
Lin
Thanks! That's really what was needed. To use <dataset> object (variable) from previous step.
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 |
---|---|
72 | |
71 | |
57 | |
38 | |
36 |
User | Count |
---|---|
81 | |
67 | |
62 | |
46 | |
45 |