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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ispajic
Helper I
Helper I

R visual behaving differently in PBI than in R console

Hi,

 

I have a simple double-source plot code:

plot(dataset[,2],type="b")
par(new=T)
plot(dataset[,4], ylim=c(0.0,83), yaxt='n', xaxt='n', ann=FALSE, type="n")
text(dataset[,4], labels=dataset[,3], cex= 0.7, pos="3")
par(new=F)

In my R console, the X axis is indexed by the first column, and shows up properly:

index-issue1-1.PNG

However, in the PowerBI visual, the X axis gets messed up and I get an odd result:

index-issue1-2.PNG

I'm not sure what it's using as an X axis, but the dataset order is identical to my R console version.

Here is the source file.

https://www.dropbox.com/s/vbee6wpze8g1vo2/dummy-line.csv?dl=0

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@ispajic,

 

Adjust the order of the fields dragged to Values.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

that doesn't help. Please see the pbix file.

https://www.dropbox.com/s/9e4pl0gr5fjqoog/r-visual_plot.pbix?dl=0

Currently it's Timestamp, Score, Event, EventZero, but no other order gets the right chart either.

I wonder if the de-duplication is messing up my timestamp?

 

 

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors