Plotting a dynamic amount of series on a chart

PeepDeep

New Member
Joined
Mar 5, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi,

Long time lurker first time question poster here :)

I'm trying to plot a variable amount of series on a chart.

I've created a dummy environment with data for my issue, however in the actual issues case, the data table in B29:R47 is filtered from a master on another sheet which I cannot amend. Ideally using the drop down in C3 the user selects which column from the data table they want to see the sales amount for, Level 1, Resource Type or Area. The table uses the FILTER formula and SUMIFs to populate dependent on the drop down. Finally this is then plotted.

Where is gets difficult is that each view has a different amount of unique items, Area has 10, resource type has 7 and level 1 has 3. I've tried to use OFFSET/Named ranges but this doesn't seem to work with a scatter plot/group of series and so I'm left with only some of my series plotted, or several blank ones.

Is there a way to avoid excel plotting an empty series?!

Huge thanks in advance :)

Test.xlsx
C
3Level 1
Groceries
Cells with Data Validation
CellAllowCriteria
C3List=$B$29:$D$29
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
you can hide the empty series by hiding their rows or columns or you can select/deselect them in the ribbon for your graph.
 
Upvote 0
Thanks for replying - the rows that need hiding/deselecting change each time a different option from the drop down is selected though.

Perhaps will write some VBA to hide blank rows automatically in my table though.
 
Upvote 0
It's been several weeks, but maybe this will help.

You can select the chart, and click the funnel icon floating next to the chart. This lists the series in the chart and, if it isn't a scatter chart, also the categories (X values). You can uncheck any series to hide it in the chart without worrying about hiding rows and columns.

You could write some VBA to check the chart for empty series and hide them. Here's the filtering code:

VBA Code:
    ActiveChart.FullSeriesCollection(2).IsFiltered = True  ' hide series 2
    ActiveChart.FullSeriesCollection(2).IsFiltered = False ' show series 2
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
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