Forum Discussion
Plot columns with multiple values
Hi
I have a load of survey data, some of the questions were multi-select responses which I need to visualise. The data looks like this
| Response ID | Natural Hazard | Fire | ClimateChange | Economic shock | Violence | Epidemic |
| 62 | ||||||
| 63 | Natural Hzard | Climate Change | Economic shock | |||
| 76 | ||||||
| 148 | Natural Hzard | |||||
| 155 | ||||||
| 162 | ||||||
| 168 | Fire | Climate Change | ||||
| 175 | ||||||
| 197 | Fire | Climate Change | Economic shock | |||
| 213 | ||||||
| 221 | ||||||
| 233 | Climate Change | Economic shock | Epidemic | |||
| 234 | Climate Change | Violence | Epidemic | |||
| 236 | Climate Change | Economic shock | Violence | |||
| 257 | Natural Hzard | Fire | ||||
| 267 | Natural Hzard | Climate Change | Economic shock | Violence | ||
| 275 | ||||||
| 286 | ||||||
| 296 | Natural Hzard | Fire | Climate Change | Economic shock | ||
| 300 | ||||||
| 309 | Natural Hzard | Fire | Climate Change | |||
I want to produce a colum chart that shows a count for each response. So the x axis woould have Natural Hazard, Fire, Climate Change, Economic Shock, Violence and Epidemic and the y axis would be a count value, but I cannot work out how to do this. Help please!
Thanks
A
- Anonymous7 years ago
Hi
How are you looking to present the data?
If you are simply looking to represent each one selected with a count you can create seperate measures for each type as follows:
Natural Hazard Count = CALCULATE( DISTINCTCOUNT([Response ID]), FILTER(Table, [Natural Hazard] = "Natural Hazard") )
However, if you are looking to combine these, you are best transposing the data in the query editor.
Hope that helps.
Thanks
1 Reply
- AnonymousNot applicable
Hi
How are you looking to present the data?
If you are simply looking to represent each one selected with a count you can create seperate measures for each type as follows:
Natural Hazard Count = CALCULATE( DISTINCTCOUNT([Response ID]), FILTER(Table, [Natural Hazard] = "Natural Hazard") )
However, if you are looking to combine these, you are best transposing the data in the query editor.
Hope that helps.
Thanks