I currently try to create a worksheet that shows the Air Quality Index regarding multiple pollutants like CO, NO2, Ozone, etc.
For that, I want to create a histogram that shows the number of days that a city has been in a specific range of AQI.
For this I created bins of the size 5, so that I don't get too many different bars.
Every AQI pollutant has a separate column in the table so i have separate measures for each pollutant.
It works when i create separate tables for each pollutant.
However, when I try to combine the tables into one side-by-side histogram, it looks like this:
As you can see, all the different measures are correctly listed in the histogram and binned into the ranges of 5.
But as you can also see, the values shown in the histogram are incorrect (it reports the same values for every pollutant, while there should be differences ofc).
When i click on the data button for example for the range 15-20 and pollutant CO, it gets clear why:
All the measures/ bars get binned by the Ozone value, instead of the individual values.
For example for the CO bars the binning should be done by the CO value obviously.
After this long excurse, my question now is:
Is there some way to tell Tableau that the binning for the individual measure values should be done by the separately?
I tried adding bins for the other values (apart from Ozone) to the Colums, but this destroys the side-by-side table.
Creating this view would be easier if you pivot your data to have multiple rows per location/date — one per index. That is pivot to make a column called index-name and index-value say, rather than having specific columns for each index. Tableau can pivot easily - see the online help.
Other views might be easier with the original data shape - if so, you can have multiple data sources based on the same source, and use the best for each view