Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (17.6k points)

I am new to tableau 10. I have two class variables say A and B entered in rows at the top of my worksheet. What I want is the count of A and B (in statistics we call A*B an interaction). I want the number of rows with A and B attributes.

1 Answer

0 votes
by (47.2k points)

This can be achieved with the help of Sets in Tableau or using a Filter. Let's look at the procedure for both with this sample dataset.

+--------+--------+------+

| ClassA | ClassB | Name |

+--------+--------+------+

|      1 |   1 | Abc |

|      0 |   0 | Def |

|      0 |   1 | Ghi |

|      0 |   1 | Jkl |

|      0 |   1 | Mno |

|      1 |   0 | Pqr |

|      1 |   0 | Stu |

|      1 |   0 | Vwx |

|      1 |   1 | yz |

+--------+--------+------+

Set - Let’s create a set from name the 'Name' field as shown below

enter image description here

  • We should create the set based on a condition. When ClassA = 1 AND ClassB = 1. We do that as shown below. I am naming the set with the default name 'Set 1'

enter image description here

  • Now lets drag 'Set 1' and 'Number of Records' to the rows. We would get something as shown below.

enter image description here

  • This can be read as 2 member are in the set, while 7 do not satisfy the condition and are out of the set.

Filter - Add ClassA and ClassB to the filter and select the values you want to see. Here is the screenshot of the output of adding a filter

enter image description here

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...