cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mohsenhs82
Frequent Visitor

Output is different from R script and plot generated by Power BI in Power BI

Hello BI developers,

 

I came across a strage situation which does not make sense. I am sure I am doing somethign wrong but I cannot figure it out. I have a dataset (very huge) and need to do some visulisation. I need to some part in R to make the life easier, but the outputs are different even for the simpleset scanrio which is counting the rows. I have added an Index (auto increment) from Power BI to avoid any possible removal of duplicate rows.

All the values in the R script have "Don't summarize", but still the values (the count) are different. Please see the screenshots. If you need more information please let me know.

 

 

library(sqldf)
library(ggplot2)

options(scipen=999)
datas=sqldf("select count() as tc, Year from dataset group by Year ")
ggplot(datas, aes(x = Year, y = tc)) +  geom_line() 

 

Bi graph.jpgdo not summarise.jpgRscipt.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-jiascu-msft
Microsoft

Re: Output is different from R script and plot generated by Power BI in Power BI

Hi @mohsenhs82,

 

I can reproduce the same result. But I'm afraid this is a limitation of R visual in Power BI. Please refer to desktop-r-visuals#known-limitations. If I reduce the size of data to less than 150000, it's good.

Output_is_different_from_R_script_and_plot_generated_by_Power_BI_in_Power_BI

 

Best Regards,

Dale

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

View solution in original post

2 REPLIES 2
Microsoft v-jiascu-msft
Microsoft

Re: Output is different from R script and plot generated by Power BI in Power BI

Hi @mohsenhs82,

 

I can reproduce the same result. But I'm afraid this is a limitation of R visual in Power BI. Please refer to desktop-r-visuals#known-limitations. If I reduce the size of data to less than 150000, it's good.

Output_is_different_from_R_script_and_plot_generated_by_Power_BI_in_Power_BI

 

Best Regards,

Dale

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

View solution in original post

Highlighted
mohsenhs82
Frequent Visitor

Re: Output is different from R script and plot generated by Power BI in Power BI

Thank you Dale,

 

I see, when I plotted the total number of rows in my R scipt I saw 150k. I was suprised as I have millions of records. so this is the limitation. what a shame, but at least I know, and thanks for the link too.

 

Thanks

M

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors