I'm trying to build a chart within google sheets to compare my portfolio contributions vs yearly allowed maximum limits. My data looks like the below. I'm not sure which chart to make use of to visualize this information. I would like to generate a chart that lets me compare these two values each year and each account. I'm okay to filter on year on the chart. Can you please help get me started building the right type of chart?
- The first column is account type
- Then each year will be a column which will be split into two Max vs Current.
- Each Row will be an account type followed by actual values
2022 | 2023 | |||
---|---|---|---|---|
Max | Current | Max | Current | |
Roth | 6000 | 6000 | 6000 | 0 |
401k | 20000 | 4000 | 21000 | 0 |
HSA | 7300 | 6000 | 7800 | 0 |
Edit
I would like to be able to filter on the year and display data only for that particular year. I don't need comparison between years. I only want to compare max vs current values for each account type under one year.
Edit 2
I've further simplified my data table a bit and am able to accomplish my requirements using a bar chart. I now want to understand how to use filters/slicers to populate chart based on the year selected.
This is how my updated table looks like
Year | HSA | Roth | 401k |
---|---|---|---|
2022 Current | 6000 | 6000 | 6000 |
2022 Max | 7350 | 6000 | 20000 |
2023 Current | 1000 | 1000 | 1000 |
2023 Max | 7850 | 6000 | 21000 |
The chart works fine when I filter for 2022. However, when I filter for 2023 data, there is nothing. How do I make my chart dynamic depending on the values I select on slicer?