When we create a pivot table report, based on statistical data, it’s sometimes convenient to group them into bins so that we can analyze them more easily. In one simple case, where we research the age of the respondents and the answer to the question whether they are smokers or not, you will see how the groups (bins) are made and how can we later use them to create beautiful charts.
The data source is a two-column table. In the first column there are years of respondents, and in the second answer to the question whether respondent is a smoker or not (YES or NO). Let’s select the data range and then create a pivot table in the same worksheet. In the Columns field we should drag the dimension SMOKER, and we will repeat this by dragging it to the Value field. This action will create implicit measure Count of SMOKER. Next, let’s drag AGE dimension into Rows. And for more transparent look we should remove totals from pivot table report.
If you pay attention to the pivot table you will see that it has lots of rows. How would we group years of respondents into bins? We do this by right-clicking over any item in the row, then choosing the Group option.
A dialog box that contains three text boxes will open.The first of them (Starting at) denotes the value from which starts the data that will be displayed in the pivot table. The second field (Ending at) serves to set the value to which the data ends. The last field (By) indicates the size of the group (bin). In our case, we will choose to show the respondents from 18 to 69 years in groups of 10 persons
After we confirm the action you should notice that the number of rows in the pivot table has decreased. That is, instead of years of respondents, we see 6 groups with given range of years. Now, we just need to make a little more glamor by choosing proper style for our report and add the appropriate chart based on the results of the research.