Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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.
Thanks in Advance.
Solved! Go to Solution.
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
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