Forum Discussion

vlengure's avatar
vlengure
Frequent Visitor
8 years ago
Solved

Incorrect representation of Bar Graph using R Code in Power BI

Hello Everyone,

This issue is related to replication of a graph/pattern in Power BI using R code.

This is our Dataset -
A,B,C
0,0,1
0,1,0
0,1,1
1,0,0
1,1,0
1,1,0
1,1,1
1,1,1



Rcode :
data <- fread('C:/Users/kkuncham/Downloads/test_upset.txt', sep=',')
 
require('UpSetR','C:/Users/kkuncham/Library')
library(UpSetR)

This is the graph in R -

 

When I try to replicate the below-mentioned code in  Power BI-
 
require('data.table','C:/Users/kkuncham/Library')
library(data.table)
data = as.data.table(dataset)
require('UpSetR','C:/Users/kkuncham/Library')
library(UpSetR)
upset(data )

I see this graph, "Bar Graphs" are incorrectly plotted -


I would really appreciate if anyone can help me with this. Thanks.

Best Regards,
Vivek L
  • vlengure's avatar
    vlengure
    8 years ago

    Hey Michael,

    Apologies for the detail. I was able to solve the problem by addressing the removal of the duplicates issue. I created an extra measure to fix it.

    Thanks for your attention and time. I really appreciate it.

    Best Regards,
    Vivek L

2 Replies

  • v-micsh-msft's avatar
    v-micsh-msft
    Microsoft Employee

    Would you please share the Library file for further investigation?

     

    The file should be stored in:

    C:/Users/kkuncham/Library

     

    I suspect the display error might be caused by the Library execution.

     

    Regards,

    Michael

     

    • vlengure's avatar
      vlengure
      Frequent Visitor

      Hey Michael,

      Apologies for the detail. I was able to solve the problem by addressing the removal of the duplicates issue. I created an extra measure to fix it.

      Thanks for your attention and time. I really appreciate it.

      Best Regards,
      Vivek L