Forum Discussion
How to link and visualize yes/no data sets
First data - Substances
| ID | Meth | Alcohol | Opioid |
| 1 | yes | no | yes |
| 2 | no | yes | no |
| 3 | no | yes | yes |
Second data - Mental health disorder
| ID | ADHD | Depression |
| 1 | yes | yes |
| 2 | no | no |
| 3 | no | yes |
yes means the patient use the substance or has the mental health disorder.
I want to visualize ADHD by substances, Depression by substances to see the distribution of substance use.
Visual can be donut, box or whatever.
I can visualize each of data sets by using "unpivot".
If I merge then unpivot, I got the table below.
| ID | Mental | Subtance | ||
| 1 | ADHD | yes | Meth | yes |
| 1 | ADHD | yes | Alcohol | no |
| 1 | ADHD | yes | Opioid | yes |
| 1 | Depression | yes | Meth | yes |
| 1 | Depression | yes | Alcohol | no |
| 1 | Depression | yes | Opioid | yes |
Any help or comments will be appreicated.
rainbow_isla , Please find the file attached after signature. Both are merged in First table and Transformed
2 Replies
- AllisonKennedy
Community Champion
rainbow_isla This looks similar to survey type data. I would suggest creating a Dim table that has 1 row for each ID, then relate that to the substance table (unpivoted) and disorder table (unpivoted). Then use DimID in all visuals to relate them.
I did something similar in my webinar on survey data analysis: https://www.excelwithallison.com/MCT/news#h.p_NkgcNxVFFYaS
- amitchandak
Super User
rainbow_isla , Please find the file attached after signature. Both are merged in First table and Transformed