Back

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

I am new to Tableau and trying to get myself oriented to this system. I am an R user and typically work with wide data formats, so getting things wrangled into the proper long format has been tricky. Here is my current problem.

Assume I have a data file that is structured as such

ID       Disorder     Value

1         A             0     

1         B             1

1         C             0

2         A             1

2         B             1

2         C             1

3         A             0

3         B             0

3         C             0

What I would like to do is to combine the variables, such that the presence of a set of disorders are used for summary variables. For example, how could I go about achieving something like this as my output? The sum is the number of people with the disorder, and the percentage is the number of people with the disorder divided by the total number of people.

Disorders        Sum       Percentage

A                 1            33.3 

B                 2            66.6

C                 1            33.3

AB                2            66.6

BC                2            66.6

AC                1            33.3

ABC               2            66.6 

 

1 Answer

0 votes
by (47.2k points)
  • The approach to this problem would depend on how flexible it has to be. Ultimately a wide data source with your disorder of making columns would make this easier. 

  • You will still need to blend the results on a data scaffold that has the combinations of codes you are wanting to get this to work in Tableau.

  •  If this needs to be scaled, you would have to do the transformation work using custom SQL or another ETL tool like Alteryx. I posted a solution to this question for you over on the Tableau forum where I can upload files: http://community.tableausoftware.com/message/316168

Browse Categories

...