You are on page 1of 4

Welcome back.

In this part,
we're gonna explore some charting capabilities.
We got the basic structure of our dashboard.
We got our client Lucy, the sales manager happy.
But we want to pay more attention to different kinds of
visualizations and charting.
So let's move to Excel again.
And we have a pivot similar to
other pivots we were doing before.
In this case, I have categories and Sub Categories in rows.
And I have a filter on years that allow me to
switch between year to year, nothing special so far.
Now I know that I can attach to each pivot table a pivot chart.
And I do that by clicking the PivotChart here.
And I know that I have different options of creating
visualizations.
Now in my last discussion with Lucy, she mentioned a very
specific kind of visualization she was interested.
She wanted to see some structure,
some hierarchical representation of the data.
We have larger parts like categories, and
smaller parts within those categories.
So I noticed a few times before that my good
friend here is the tell me feature.
Remember this is a relatively new feature.
You wouldn't find it in other versions.
And also I'm gonna now show you some features which are actually
very new.
So the types of charts that I'm gonna use are new to Excel 2016
and even to the further updates after the release,
the original release of 2016.
So hierarchical, let's see what Excel has to say.
I start typing hierarchical and immediately,
the table feature says you can insert a hierarchy chart.
There are two of them, Treemap and the Sunburst .
I click on it and immediately, I get an error saying you cannot
create this chart type with data inside a pivot table.
That's not a good thing to find at this point.
And actually this is part of a bigger limitation that not every
chart that is known to Excel can be used as a pivot chart.
So not every chart can use data within a pivot.
For example there are others, for example, scatter charts, and
the moment I try to use this while I'm on the pivot,
it tells me you can not create this chart.
Same error message I was getting before.
And I still want to use this kind of hierarchical structure.
So I can actually use or reuse the technique that we use in
the previous part of creating
data using summarizing data from the detailed
table not with the pivot but with expressions.
And once this is done with expressions I will be able to
utilize those new chart types.
By the way those chart types are planned to be supported as
pivot charts.
So you should expect further down version
of Excel that those charts will be supported as pivot charts,
but there's still gonna be others that are not going to be.
And I might need to do the same thing of creating
the data with formulas instead of a pivot table.
So if you remember I started last time copying the pivot
to our regular range just to have the regular structure.
But here before I do that
I want to change a little bit of the structure of the pivot.
We're going to go to an area of the ribbon that
we didn't see before.
Under pivot table tools we used quite a few features of
the analyze [tab on the menu ribbon], but we didn't see that there is also a design
[tab on the menu ribbon].
And design is something that enables us to apply styles,
and also there is something that is called the report layout.
I'm gonna use a report layout that is called tabular.
So this is the way it's gonna be.
So instead of if I undo it you'll see that the categories
and the subcategories are all in the same column, column D in this case.
And the subcategory which is nested within,
is a little bit shifted in.
But in the tabular way, each one of them occupies its own column,
and this is the way I want it.
Now another thing that I want to change is
that I want to repeat all item labels.
I want to have, for each row, the categories to be repeated.
You'll understand in a moment why do I need it.
Another thing that I want is actually I want to remove
the subtotals.
So I can right click on the subtotal and just uncheck it.
And also I don't need the grand total, so
I can actually do the same for grand totals.
And that's it.
So this could be the basis of the report that I'm gonna use
for my hierarchical chart.
So again, I'm going to copy it and
I'm going to paste it as values.
Increase a little bit the width of the columns.
Apply a format in an Excel way, not in the pivot way.
And I don't, well sorry, actually I don't need.
The numbers will be recreated by me
as the SUMIFS function, remember?
So now I can start doing the SUMIFS function.
SUMIFS function.
That will say SUMIFS to be a little bit simpler because I
only have something on rows and nothing in columns in this case.
So again I'm gonna summarize the revenue.
And I'm going to slice it or filter it by.
And I can actually use sub category because
each sub category define the category that it comes from so
I don't need to use both the category and the sub category .
So the sub category and
I would say that the sub category comes from this cell
And I actually don't even need to adjust the reference to
absolute or relative because I'm not going to drag this value,
this expression anywhere.
So and
another one that I want to use is the year, says data year.
And in this case, it's gonna come from this cell here.
And here I do have to push F4 to make it absolute.
Okay this is the value,
it fits the value that I have in the pivot so I'm happy.
And I drag down the values and
I know that I can actually drive it using the filter from here.
And again this pivot, just finish its function.
I don't need it anymore and I can actually again
change the options not to fit the width of the columns and
take it from here, cut and paste over here.
So it will look really as if filtered to this area.
I just didn't drag it all the way.
There it is.
All right, so now once this is a regular range let's see
what I'm gonna start writing hierarchical again and
now it tell me, insert the hierarchy chart.
The moment I try it shows me this preview.
I see that I have two, I have the Treemap and
I have the Sunburst .
We'll explore each one.
So now I'm going to introduce the chart.
And you see this is what I call a hierarchical chart.
So it shows the first column which is per the category
as these large areas which have the titles with them, bikes,
accessories, and clothing.
Within each area,
there are sub-areas which belong to the sub categories .
And the relative sizes of the big areas and
the smallest areas inside them
are proportional to the value that is in this column.
And the same thing will be true for if I change
the chart type and I go from the Treemap to the Sunburst .
Sunburst is actually a good way to show even more hierarchy,
like more levels into it, but
the principle is the same only across this circle shape.
And I know that I want to see what happened when I change
years, so you see immediately that the chart responds.
One last thing I want to test, remember in 2014 we
only had one major category, bikes, so here it is.
Now what will happen when I click on (All) ?
We saw before what this will cause us.
It will actually break everything.
But and remember what we did last time was that we
introduced an if statement saying that if the value for
the slicer equals and I have to make
it absolute if it equals "(All)" .
Then, last time I entered an asterisk value but
I won't do it, believe me it wouldn't work.
The reason it wouldn't work in this case is that the year
value is numeric and
the asterisk is a good wild card to catch all values for strings.
But if I wanted to do it for values for numeric values what I
could do, I could actually enter as a criteria greater than zero
As a string like this [">0"].
And this, and otherwise so this I have to complete the if saying
if it's not equals to all then, oops so just use it as it is.
And now I will just close one more parenthesis and
I just did it for one Row.
I double-click and you see that now it actually
works well with all, and also with single year.
It works fine.
I would not be able to use this trick as it is for
selecting two years like 2014 and 2015.
But each individual year and the total for all years.
So we saw again a use of a non pivot table approach for
summarizing the data.
And we saw that there are some types of charts that cannot be
used as pivot charts.
And we saw that there are few new chart types that were
introduced in Excel 2016 and some of them you could explore.
They're not just the student hierarchical ones,
but we saw that if we have hierarchy data,
like here with category and sub category the treemap and
the sunburst can be used to visualize this kind of data.
See you next time

You might also like