Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Can anyone please help me in understanding the R Query in my powerBI report , so based on that I will change it in perl Script.
new_data <- dataset[dataset$ParName == 'Turbidity Field (NTU)',c('DepthValue','ResultValue','SampleDate', 'StationID')]
new_data$ResultValue = round(new_data$ResultValue, 2)
xrange <- range(new_data$ResultValue)
yrange <- range(new_data$DepthValue)
yrange <- range(c(0, yrange[2]))
plot(xlim=xrange, yrange, ylim = rev(yrange), type="n", xlab="Turbidity Field (NTU)",ylab="Depth", axes=FALSE )
all_lines <- unique(paste(new_data$SampleDate, new_data$StationID))
colors <- c()
c <- 0
for (i in all_lines) {
c <- c + 1
colors <- c(colors, c)
}
cc <- 0
limited_lines <- all_lines[0:5]
limited_colors <- colors[0:5]
for (i in limited_lines ) {
cc <- cc + 1
cur_data <- subset(new_data, paste(SampleDate, StationID)==i)
sorted_data <- cur_data[order(cur_data$DepthValue),]
lines(sorted_data$ResultValue, sorted_data$DepthValue, type="l", lwd=5, col=limited_colors[cc])
}
axis(3)
axis(2)
box()
Thanks,
Rosh
Hi @Anonymous ,
You could start R learning from here: https://www.tutorialspoint.com/r/index.htm
Then, please refer to below documents to run R script in Power BI desktop.
Run R scripts in Power BI Desktop
Create Power BI visuals using R
Regards,
Yuliana Gu
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |