Skip to main content

Power BI

Needs Votes

DAX R and PYTHON functions

Vote (18) Share
Gregory Deckler's profile image

Gregory Deckler on 13 May 2020 22:36:30

Provide DAX functions that execute R and Python scripts. Similar to how you can insert an R or Python step in Power Query, allow a construct similar to:

Column =
VAR __MyVar = PYTHON("python code goes here")
RETURN
__MyVar

This would open up a whole world of analytics and other capabilities and complete the tight integration of R and Python within Power BI

Comments (2)
Gregory Deckler's profile image Profile Picture

Anthony Yanan on 10 Mar 2023 19:41:27

RE: DAX R and PYTHON functions

I just thought about the potential for this feature and checked to see if it existed yet as an idea. This could open a mind-blowing amount of analytical synergy between the high performance of analysis services and the endless statistical complexity of python. Imagine running a linear regression on a dynamic sample based on the filter context of the report or even the row context of the visual! The biggest problem I see would be performance issues. You would have to be very careful with your python code. I'm sure they could put in some processing power guardrails though, to keep measures using python from eating up all the resources. Not to mention they've already created similar functionality with Machine Learning Services in SQL Server. Great, great idea!

Gregory Deckler's profile image Profile Picture

sue bayes on 27 Oct 2022 08:11:30

RE: DAX R and PYTHON functions

It needs to go further, needs to allow for refreshing within the service not as a personal gateway