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

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.