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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors