Filtering Chart with Shading

scgilbert1

New Member
Joined
Nov 15, 2011
Messages
15
Hello,

I have always been interested in the dynamic filtering other programming languages have. I know excel has timeline filters but I am looking more for something like the following charts. Overall, the functionality works as following. The user can use one of the two scrollbars below the charts to filter the view of the top chart. They can see what is being filtered in the bottom chart.

Here is how I created it:
  1. Top chart is based on a filtered range of the base data using the new filter function.
  2. Bottom chart is the full data with the addition of a secondary axis using True/False. False = Visible and True = Not Visible or Filtered. I reduced the gap between bars so it appears as shading.
  3. The two scrollbars return a period with the top scrollbar managing the lower range and the bottom scrollbar managing the upper range.

Overall, it works but I cannot solve the following:
  • The top chart shows blanks for the full data set. I think this is because the filtered output is smaller than the range the chart is looking at. I don't know how to get Excel to ignore the empty cells so the chart condenses to only what is shown.
  • I cannot seem to remove the secondary axis on the bottom chart. When I do, it moves the secondary axis data back to the primary axis so I lose my shading.
  • When I use the scrollbars, the filtered data updates in real time but the charts don't update until I release the scrollbar. It would be nice for the chart to update in real time too.

1669824630204.png
1669824644421.png



Thank you!
 

Attachments

  • 1669824041762.png
    1669824041762.png
    14.6 KB · Views: 8
  • 1669824082142.png
    1669824082142.png
    15.8 KB · Views: 10

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top