Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Replace value in R Script with Measures from Power BI

Hi Experts

 

is it possible to replace a value in a R Script code with a measure from Power BI so that the R Script code work dynamically based on the measure.

time_tot <- 1497.7
  num_rev <- 18
  (incidence <- (num_rev/time_tot)*100)
  (ci <- (unlist(prop.test(num_rev,time_tot)[6])*100))

so i want to be able to replace <-1497.7 with measure 1

and from num_rev <- 18 with measure 2. just the 18 part.

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

As this post said:

https://community.powerbi.com/t5/Desktop/Pass-a-value-into-R-script/td-p/663406

It can't be achieved that replace value in R Script with Measures from Power BI.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

As this post said:

https://community.powerbi.com/t5/Desktop/Pass-a-value-into-R-script/td-p/663406

It can't be achieved that replace value in R Script with Measures from Power BI.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

thanks lin once again

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.