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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
quantico
New Member

change value of variable dynamically using parameters ( R script)

how can I dynamically change a variable of a R script using the parameters of a template please !!

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @quantico,

 

In Power BI Desktop, we can run R script to import data, create R visual, and prepare your data model in Query Editor. As query parameter is used for retrieving data only currently, you shoud be able to call it when running R script to import data, and prepare your data model in Query Editor, but not to create R visualSmiley Happy

 

In adition, here is a similar thread for your reference. Smiley Happy

let
    Quelle = R.Execute("NormalNoise <- data.frame(x=rnorm(100, mean="&Text.From(Parameter1)&", sd=1))"),
    EnvVars1 = Quelle{[Name="NormalNoise"]}[Value]
in
   EnvVars1

Regards

View solution in original post

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @quantico,

 

In Power BI Desktop, we can run R script to import data, create R visual, and prepare your data model in Query Editor. As query parameter is used for retrieving data only currently, you shoud be able to call it when running R script to import data, and prepare your data model in Query Editor, but not to create R visualSmiley Happy

 

In adition, here is a similar thread for your reference. Smiley Happy

let
    Quelle = R.Execute("NormalNoise <- data.frame(x=rnorm(100, mean="&Text.From(Parameter1)&", sd=1))"),
    EnvVars1 = Quelle{[Name="NormalNoise"]}[Value]
in
   EnvVars1

Regards

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.