Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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.