Forum Discussion

cmcknight's avatar
cmcknight
New Member
4 days ago

Run R/Python scripts in PBI Power Query

I want to use R/Python scripts to transform data in PBI Power Query, but I cannot see those options under the "Transform" ribbon now. Does anyone have any ideas to make it show up? Thank you. 

I'm using the September 2026 version of PBI. There is no show of "Run R Script / Run Python script": 

This is the snapshot that I usually see on the very right shown two icons that I want to bring back. 

 

2 Replies

  • ShivekMaharaj's avatar
    ShivekMaharaj
    Icon for Community Champion rankCommunity Champion

    Hi cmcknight​,

    Your screenshot looks like the New Power Query experience rather than the classic Power Query Editor.

    Microsoft’s current documentation for R and Python still shows these commands in the classic editor under:

    Transform -> Run R script
    Transform -> Run Python Script

    You can see that in the R in Power Query Editor guidance and the Python in Power Query Editor guidance.

    I would first test the legacy editor:

    File -> Options and settings -> Options -> Preview features -> clear New Power Query experience

    Microsoft documents that you can return to the legacy experience when the new Power Query UI is missing functionality needed for your workflow.

    The current New Power Query limitations page does not specifically list R/Python scripts as a documented limitation, so I would use this as a diagnostic rather than assuming the feature has been removed.

    If the buttons return in the legacy editor, that confirms it is related to the new UI.

    If they are still missing there, then I would check:

    File -> Options and settings -> Options -> R scripting
    File -> Options and settings -> Options -> Python scripting

    and make sure Power BI detects valid local R/Python installations.

    For Python, Microsoft also requires pandas to be installed.

    So I would troubleshoot it in this order:

    switch to legacy Power Query
    -> check whether the buttons return
    -> verify R/Python installation paths
    -> restart Desktop if needed
    -> test again

    If the commands only disappear in the New Power Query experience, I would submit that as feedback because it is not currently listed as a documented limitation.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.

  • Hi cmcknight,

    I think the key point is that your screenshot looks like the new Power Query editor, which is still a preview in the September 2026 release. That editor does not always show the same ribbon buttons as the classic one, so the Run R script and Run Python script buttons may simply not be part of it yet.

    Two things can hide those buttons, and it helps to check them in this order. The first is the preview feature for the new Power Query experience under File, Options and settings, Options, Preview features. The second is the scripting setup itself, because R and Python need a local installation that Power BI Desktop can find. The setup steps are in the R in Power Query Editor documentation

    The Python equivalent is described in the Python in Power Query Editor documentation

    So I would check it in this order

    1. Options -> Preview features -> turn off the new Power Query experience -> restart Desktop
    2. Open Power Query -> Transform tab -> Run R script and Run Python script back?
    3. Options -> R scripting and Python scripting -> home directory detected?
    4. Still missing -> update Desktop and check the install of R or Python
    New Power Query editor (preview) -> fewer ribbon buttons -> scripts missing

    I am inferring the new editor from your screenshot, so please confirm whether you turned that preview on. If the buttons are still missing after switching back, the scripting setup is the next suspect. Until the new editor supports scripts, you can also keep the classic editor for any query that needs R or Python.

    So I would turn off the new Power Query preview first, restart Desktop, and then check the scripting options if the buttons do not return. Please let us know what you find and mark a reply as the solution if it helps.

    AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.