Bar in bar charts aid in comparing two numerical values based on the length of the individual bars. There are two ways to do this if I want to compare year 2020 sales to year 2021 sales based on each category.
The first method is by combining the axis.
1 . Drag categories to rows and 2020 sales to columns
![](https://www.thedataschool.co.uk/content/images/2022/12/1-1.png)
2. Drag 2021 sales to the sales axis for a combined axis.
![](https://www.thedataschool.co.uk/content/images/2022/12/2.png)
![](https://www.thedataschool.co.uk/content/images/2022/12/3.png)
3. Take measure names off rows unto size on the marks card.
![](https://www.thedataschool.co.uk/content/images/2022/12/4-1.png)
4. Control drag measure names unto color.
![](https://www.thedataschool.co.uk/content/images/2022/12/5-1.png)
5. Go to analysis and put off stack marks
![](https://www.thedataschool.co.uk/content/images/2022/12/6.png)
![](https://www.thedataschool.co.uk/content/images/2022/12/7.png)
6. Reorder the sizes for a better view by dragging 2021 above 2020 in the size legend.
![](https://www.thedataschool.co.uk/content/images/2022/12/8.png)
![](https://www.thedataschool.co.uk/content/images/2022/12/9.png)
The second method is by using dual axis.
- Bring categories unto rows, both 2020 and 2021 sales unto columns and create dual axis.
![](https://www.thedataschool.co.uk/content/images/2022/12/1-2.png)
2. Synchronize axis
![](https://www.thedataschool.co.uk/content/images/2022/12/2-1.png)
3. Click on All on the marks card and change mark type to bar.
![](https://www.thedataschool.co.uk/content/images/2022/12/3-1.png)
4. Click on 2021 Sales in the marks card and reduce its size to your liking
![](https://www.thedataschool.co.uk/content/images/2022/12/5-2.png)
5. Further formatting can be done to suit your task
![](https://www.thedataschool.co.uk/content/images/2022/12/7-1.png)