Venn Diagram

Frequent Visitor
13244 Views
Moderator boefraty
Moderator

Re: Venn Diagram

You missed my "tip" about making sure each column to be  "Don't summarize" . Working PBIX with filters is also attached Capture.PNG

 

juniper Frequent Visitor
Frequent Visitor

Re: Venn Diagram

Hi Boefraty,

 

That's so strange. My file on this end says "don't summarize" is selected. Your code won't run because it doesn't like the (perfectly good) file path, and it says duplicate rows have been removed from the data, which isn't supposed to happen.

 

Many thanks,

Jennifer

 

 

juniper Frequent Visitor
Frequent Visitor

Re: Venn Diagram

Dear Boefraty,

 

I got it to work! Thanks so much. You have been amazing. I truly appreciate your help and your patience.

 

Thanks again,

Juniper

juniper Frequent Visitor
Frequent Visitor

Re: Venn Diagram

Hi Boefraty,

 

How large of a data set can a Venn Diagram handle in Power Bi?

 

Many thanks,

 

Juniper

Moderator boefraty
Moderator

Re: Venn Diagram

Hi @juniper

I am glad it worked out for you. Here are limitations of R visuals in PBI: 
https://docs.microsoft.com/en-us/power-bi/desktop-r-visuals#known-limitations

 

juniper Frequent Visitor
Frequent Visitor

Re: Venn Diagram

Thank you so much!!!

spotpuff Frequent Visitor
Frequent Visitor

Re: Venn Diagram

This visual appears to give incorrect results when 4 fields are selected.

I can do 3 just fine but 4 doesn't calculate properly, e.g., a category with 30 items shows 20, 4, 0, 0 instead of adding to 30.

My math could be off, though. I think with 4 categories there's no way to actually show the top & bottom categories (or left & right) intersecting since they already overlap in the middle.  Maybe that's just a limitation of Venn diagrams; in that case maybe limit it to 3 categories?

 

venn3.PNG3 categories: correct figures; each category adds to 8.venn4.PNG4 categories: Something is wrong; categories add to 7.


venndata.PNGData is standard 4 variable w/ 2 options per variable.

Moderator boefraty
Moderator

Re: Venn Diagram

Hi @spotpuff

Please make sure all the rows in your input table are UNIQUE. You can do it by adding ID column (but ignore it in R script). 

spotpuff Frequent Visitor
Frequent Visitor

Re: Venn Diagram

The rows are unique; I was using an illustrative example but I was using the diagram on a real dataset which has a row ID type field and I was still having problems with the 4 dimensional Venn diagram.

 

The issue is likely something to do with more than 3 categories requiring strange diagrams:

https://en.wikipedia.org/wiki/Venn_diagram#Extensions_to_higher_numbers_of_sets

 

The visual doesn't make the 4th category into that "rainbow" type thing, so the math might be off.

 

Or I might be wrong.

Either way for now I'm sticking with 3 categories as the math works out in that diagram.

Moderator boefraty
Moderator

Re: Venn Diagram

Hi @spotpuff

The code uses the VennDiagram package, check their documentation. 

Can I get the PBIX with exact R code and data which you use for testing ?