Forum Discussion
Anonymous
7 years agoNot applicable
Need help with the R script
Hi, I have 2 columns in my dataset namely [name] and [mathscore] and i want to show the barchart with that but failed to do that. Can anyone will tell how to write the syntax for this. Thank...
- 7 years ago
Hi Anonymous,
Based on my test, you could use the ggplot function to show a barchart in Power BI:
library(ggplot2) # Basic barplot p<-ggplot(data=dataset, aes(x=dataset$Name, y=dataset$mathscore)) + geom_bar(stat="identity") p
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
v-danhe-msft
7 years agoMicrosoft Employee
Hi Anonymous,
Based on my test, you could use the ggplot function to show a barchart in Power BI:
library(ggplot2) # Basic barplot p<-ggplot(data=dataset, aes(x=dataset$Name, y=dataset$mathscore)) + geom_bar(stat="identity") p
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He