This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
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
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 21 | |
| 21 | |
| 21 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 56 | |
| 54 | |
| 48 | |
| 26 | |
| 24 |