Excel Color Change When Using Slicer - excel

I have problem using excel color chart. First of all I'm using color theme that I already set before.
lets say
A: Blue
B: Purple
C: Orange
D: Green
but after I'm using slicer which not include the B: purple
the color that I set before become
A: Blue
C: Purple
D: Orange
Can I somehow event using slicer still got the same color I set before?
I mean like this
A: Blue
C: Orange
D: Green

This is a known issue. Whether bug or feature is up to the beholder.
There's an article on Jon Peltier's blog, written by Jon Acampora, Pivot Chart Formatting Changes when Filtered, discussing the problem and possible workarounds. Check it out. It has a sample file to download and play around with. The essence is:
Simple Workarounds One way to prevent the formatting from changing is
to create a regular chart that references the PivotTable data. With
either of the following solutions we want to avoid the PivotChart all
together, and instead create a regular chart. Again, the regular
charts do NOT suffer from the formatting issues when filters are
applied.
Solution #1 This can be accomplished by applying the technique in
Jon’s article Making Regular Charts from PivotTables. With that
technique you basically create a regular chart and then carefully add
the data series to the chart by referencing areas within the
PivotTable. You just have to be careful with the areas you select or
reference because Excel has a tendency to want to convert the regular
chart to a PivotChart.
Solution #2 The other option is to create a new area on the worksheet
that contains a replica of the PivotTable. This area just contains
formulas that reference the PivotTable. You can either use the direct
cell references like (=C9) or the GETPIVOTDATA() function to point to
the PivotTable. You might want to use the GETPIVOTDATA function if
you only want to display a subset of your PivotTable data in the
chart.
The advantage of this technique is that once you have the formula
based PivotTable setup, you can reference the entire area of the
source data range to quickly create a chart that includes all your
series. It might save you time over having to add the series
individually as you do in solution #1.

Slicer filters the data, so Excel only sees the filtered results and applies the colour mapping to them without knowing how many results it skips, hence the strange colouring system.
One solution (but it doesn't use a slicer) is to set the data value of a pie slice to zero. This way the data is still rendered, but as a zero-width slice, and the colour count increases as normal.

Related

striped bi-colour bar graph using MS EXCEL

How can I draw a chart as shown using MS Excel 2016? My sample data is
I have tried conditional formatting using MOD(ROW(),2) to highlight even and odd rows then print them in overlapping manner, but things turned messy. There will be two striped bars, one for each column.
Found at last. I need to select each column and from the format option, colour icon , substitute the solid colour with textured colour by selecting the base colour and texture type. Repeat for every column. Never explored beyond the default values in excel so far. Still need to learn a lot. 😅

Is it possible to combine static-value and cell-reference data points in a single Excel chart series?

I want to create a Combo chart in Excel, one part smooth scatter (really, just a smooth line) and the second part a stacked bar. So far, easy. But, I only have a single stacked bar, which I want to put at the bottom of the chart, rather than through the middle. This requires multiple zero-value elements in each of the series making up the stack.
While I can overload the series with lots of references to empty cells, I would rather just fill it with 0's - less risk of the referenced cell being used later.
Now, I can populate a data series by pointing to a cell, or range of cells. I can, also, populate it with static values, e.g. ={0,0,0}. But I can't find a syntax to combine the two, allowing a string of zero-values and my one real data point per series.
Any suggestions?
[edit]
Per a comment request below, the visual representation of what I want to achive without having to reference stray cells.

Order by values in an Excel chart

I'm trying to find a simple way, inside an Excel chart, to order by values descending. The largest value would appear at the far left in the chart, with all subsequent values, moving to the right, decreasing in value. I'd like to do this without having to modify any of the data.
You can accomplish this by using a pivot table and chart. This will not affect the original data.
The problem with "I'd like to do this without having to modify any of the data" is that excel is not set up to do that. The chart is making assumptions, here is an example. In Cell A1 we have 1. in A2 we have 2 and on up to A20 = 20. If you chart this using a line chart, you will get a positive curve going from 1 to 20 BECAUSE the data was sorted from least to greatest. If you want the line to have a specific curve you have to SORT your data in a way that will force that curve. You do not have to edit the data, per se, but do have to sort it. If you can provide more specific information on what you are charting I'd be glad to see if I can help.

Is it possible to get an excel chart with possibility to select the graphs to display?

I have several data in excel sheet and I wonder if its possible (through macros or something else) to select the data and display the series needed.
I'm not quite sure if I explained the situation correctly...
But I have multiple curves, and instead of plot the average curve or single curves, I would like to have the option to plot: curve 1, curve 2, curve 3, average curve...
Kind regards,
DNA
My preferred way to do this is with a combination of a couple of ideas. In general, Excel charts are easiest to maintain if they are looking at a simple range instead of complicated named ranges. Given this, I like to create a simple column of data for the chart and then use other Excel features to modify that column of data.
Note that the steps below are for a specific case of a block of data all on one sheet. There are a ton of variations that you can do to make this work for other configurations. The idea is simple: create a new column of data for the chart and use normal formulas to get the data there. You can make the x-axis a selector as well.
For the simple case of a common x-axis with varying series for the y-axis all in one block of data, I do these steps:
Start = block of data
Add a column header off to the side which will "drive" the selection. I like to make this a Data Validation drop down so that the selection is correct. I did this in G2, selecting the column headers as the Source.
With this in place, you can use the selection there to update the data in the column below it. A simple formula for doing this uses INDEX.
Formula in G3, copied down to end of data: =INDEX($C$3:$E$25,,MATCH($G$2,$C$2:$E$2,0))
This formula works by finding the column name in the list of column headers and returning that column of data. Since the row selection is blank ,,, it relies on the relative position of the cell which works since everything is lined up.
Once this is done, you can then create the chart simply using the date and the new column of data. It will respond to changes in the selector which works nicely. If you use the column G header as the series name, that will update too which is a good effect for free. Below is the chart showing the ranges it is using.

Excel 2010 area chart drop off at the beginning

Earlier this week, I asked a question about getting an area chart to drop off vertically instead of diagonally when I don't have enough data for some series.
https://superuser.com/questions/809955/excel-2010-area-chart-drop-off
teyley's answer works really well, that's exactly what I wanted. However, there is now some situations where I will have data for February to August for example but no data for January (because the employee wasn't yet in the enterprise at this moment for example).
It does create a diagonal drop off at the beginning of the chart again even though January's data are set to NA(). Using teyley's answer, I can get dynamic ranges for the series, but it still has to be progressive, the first row of data will always be January using that method. What to do if the data for a specific series actually starts on February?
So, assuming I have data for February to August, using teyley's example and answer, how could I make it so that there is a vertical drop off in February instead of a diagonal going down to 0 on January?
Here is the formula for the dynamic named range:
FirstSeries = OFFSET($B$1,1,0,COUNT($B:$B),1)
Then, I use this in the chart for each series as shown in my earlier question:
=SERIES($B$1,$A$2:$A:$A13,Book1!FirstSeries,1)
I got this answer from another forum, but I've been looking quite a while for the answer, so I'll post it here as well. The original thread can be found here:
http://www.excelforum.com/showthread.php?t=1024240
make your category axis into dates (not text or select automatically)
insert a row in your excel sheet for the date where you want the cliff (move values down) and repeat that date. In your case your Date column will read: Jan, Feb, Feb, Mar, Apr, May etc, and you don't have to add any values in the cells that are created next to Feb in the One, Two, Three, and AxisSpacer columns.
I haven't researched how you can apply this with dynamic named ranges.
As Sean Cheshire pointed out in the comments, one solution is to add white squares over the diagonal area at the beginning. There are probably multiple ways to do this. What I've done is creating a new series in the chart but instead of using areas, I'm using white bars with no shadows/borders and with no spacing. That said, there is another problem: the bars are centered on the X-axis. It means that the white bars will either cover half of a month or will be half a month short. To get around this problem, I added another series of white bars. That way, with 2 bar series, the bars aren't centered anymore, I just have to make sure to put the bars in the right place by putting the right numbers (0 or 1) in the white series.
It is not really elegant but it's still a solution.
I was able to get a chart without a dropoff on the right (showing blank spaces), by using a "Placeholder" row that has a value of 0 across all columns.
Select the area you want on your table (notice, do NOT include empty/null cells)
Create the Area Chart, using that selection, and click Select Data to modify some values. Click Edit to update the Horizontal (Category) Axis Labels, highlight your column headers again and click OK so you see them listed in the right panel, then uncheck the "blank series" in the left panel. You need to keep Placeholder checked to show your empty columns to the right of your data.
Finally, select and delete the Placeholder label in the legend, so it's as if it isn't there.

Resources