Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 17884

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

$
0
0

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


Viewing all articles
Browse latest Browse all 17884

Trending Articles