0% found this document useful (0 votes)
52 views4 pages

Aula 05 - 5.1 Profitability Analysis and Finding Anomalies

The document describes how a dashboard analyst created profitability analysis in Excel pivot tables to present to their sales manager. They calculated profit as revenue minus cost and created a profit column. They then calculated margin as profit divided by revenue but encountered errors when adding it to the pivot table due to incorrect aggregation. They instead used a calculated field for margin, which correctly aggregated the calculations. They also applied conditional formatting to highlight differences in revenue and profitability across states.

Uploaded by

The Spectrum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views4 pages

Aula 05 - 5.1 Profitability Analysis and Finding Anomalies

The document describes how a dashboard analyst created profitability analysis in Excel pivot tables to present to their sales manager. They calculated profit as revenue minus cost and created a profit column. They then calculated margin as profit divided by revenue but encountered errors when adding it to the pivot table due to incorrect aggregation. They instead used a calculated field for margin, which correctly aggregated the calculations. They also applied conditional formatting to highlight differences in revenue and profitability across states.

Uploaded by

The Spectrum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Hello, welcome back.

I remember that actually all the dashboarding that


I did in all the the goal was to present this data to
our new sales manager Lucy, so I did that, I went to Lucy,
showed her my work and she was really happy about it.
She was somewhat familiar with the pivot tables from her
previous job, but I was able to show her
a lot of new things that she didn't know and was happy about.
But like always, once she was happy with this,
she wanted more.
She wanted more sophisticated analysis, and especially she
wanted to see an analysis of profitability not because
all the charts that I created so far and all the pivots and
everything were showing just the revenue but
the revenue is not everything.
We also want to know about Profit.
So we have the cost, we have
the revenue and between them we can calculate the profit.
So I promised to go back to my lab to create
some profitability analysis and come back, with the results.
So let's see how I was able to achieve that.
So here we are back into our Excel , and
I created just one large pivot just to experiment with it.
I left aside for a moment the previous dashboard.
So we have a pivot here that have states in rows.
It has the revenue and the cost on columns.
And it has the proper product category as a filter that I can
go ahead and
just filter one or just leave it as all product categories.
Now I want to calculate the profitability.
So one way to do that, I was thinking to myself, Is I can go
to my original table, And start adding some calculated columns.
So, I can say I want to calculate profit and
say that profit will be equal to the revenue,
minus the cost, all right?
So I have here this column.
I go back to my, no not this one, this pivot.
I want to add the profit column to the pivot.
Remember that in order to do that I need to, click Refresh so
that pivot will see the new column that I created.
There it is, profit.
Again I would rather to format it correctly,
so from here I can say number formatting,
currency, all right and everything looks good.
So for here in this column I have 1200 minus 1000 is 211.
In some cases I actually have a negative profitability,
everything is fine.
But profit is one part of the thing that I want to present.
One part of the analysis,
another one is the profit margin, the percent.
So again, I was thinking to myself, I can go and
have another column that add a margin.
And in the margin I will say that the margin is equal to
the profit that I would just calculated.
Divided by the revenue.
And again I'm, oop, I'm going back to my pivot ,
Refresh, doing the same thing,
and I'm pretty sure that I'm almost done.
But if you, and I can actually go ahead and
mke this into a percent, because this is what I was
planning to show is a percent, so number format,
that's a percent and immediately
it's very obvious that something is very very wrong here.
Notice that I have here 154,000% and 1800% and all kind of
crazy numbers that do not make any sense as a percent.
I would expect the percent to be between,
I don't know, minus 1 and plus 2 or something.
So minus 100% to plus 200% or something.
Definitely not thousands and thousands of percentages.
And the reason for this is that if I go back to my table,
I have this as a column and
the pivot doesn't know that this is a very special calculation
that's a ratio between these two other columns.
So when the pivot uses this column it actually created,
and the name it gave to this column tells
us something about the wrong way that is actually was treated.
It says sum of margin, it will go ahead and
sum all the values for the percentage and
this is obviously wrong, you can not add percentages,
you have to do it in a different way, so I will just go ahead and
right-click Delete, it will call on this obviously didn't work.
I go back to my pivot ,
by the way I click Refresh see what would happen.
You see what happened?
When their margin column disappeared from the table and
I clicked Refresh it was just gracefully removed
from the pivot table because it's no longer available.
So I have to do it a different way.
And this way is using a feature of the pivot,
which is call Calculated Fields.
So from the analyze
part of the ribbon let make this whole thing little bigger.
It'll be easier for you to see.
So the Field Items and Sets option in the Ribbon for
the pivot has something called Calculated Field.
So I'm gonna create a calculated field called Margin.
And I will say that the margin is equal to.
And here I see the list of all the fields.
So it's equal to the profit divided by the revenue.
And I have to format it because by default it got the format
from the elements it was created from, which was currency and
obviously not currency, it is a percent, so
I will go to number format and say this is actually a percent.
And now I see the percentages the way I expected to be.
I see them [COUGH] as regular percentages, and
the reason is that the calculated field
is calculated at the level of the aggregates.
So first, the pivot aggregates the value for revenue and
for cost and then and for profit and
then it actually applies the calculation of the margin and
that's why it's correct now and wasn't correct when it
was actually adding up the margins from the detail table.
Now, as I told you we have another course
following this one [dat206x].
Which was already released before that, before this one.
And in this other course you will learn much more
powerful ways to create,
calculate fields, which are in this case called measures.
And you will see that we
really can achieve much more with those measures.
Calculated fields are somewhat limited.
The syntax there is not very powerful.
It's a subset of the calculations
available with Excel.
If I want to go, for example, and edit this,
I have to go to calculated fields, look for it here,
margin, see the expression here and fix it.
It's not really modern UI, a very easy UI but [UI = User Interface]
still, it's a very important part of the functionality
of the pivot table.
Without it we would not be able to calculate something as simple
as the margin which was one of the initial requirements.
Now once we have the margin, I think it's a good place
to introduce another element that can actually add a lot of
power to the pivot table and this is conditional formatting.
So conditional formatting is something that exists in
Excel for a long time.
But with pivot tables it has some extra meaning and
extra power.
So it's from the Home tab, I see Conditional Formatting.
And the way to use it on a pivot table is kind of special.
You select the kind of conditional formatting you want.
And there are different ones for these columns like revenue,
I will choose something like data bar.
In the beginning it looks kind of stupid.
It just gives me a conditional formatting for
just this cell which is not really very interesting,
but from here I have this little
icon here that can open these options and say do
we want to apply this condition on just a selected sales?
No, I wanna apply it on all cells
showing some of revenue for the level of state.
And the reason I do for I say the level of states will be you
know what let me just do it on every value so now you see
that it actually was applied to also the grand total.
You see? So the grand total is obviously
much much larger each one of the individual elements so actually
to fix the whole point to see because the purpose of this
bar was to show in the cell the relative size of each element.
So, I will just undo it and
apply again the conditional formatting but this time I will
say that they want to apply only for the level of state.
So, if I have some other subtotals that other levels or
the grand total I don't want to apply, and
now you see that the background of each cell shows the relevant
the size is based on the size of the value in it.
What about the margin?
In the margins even more powerful.
I can apply conditional formattings which are based on
color called color scales.
So I can say I want to apply a color scale and here I have
no problem saying that I want to apply it on all the values.
And now you see that the default behavior is to apply
a color scale between green and red that
will show the small numbers as red, the big numbers as green.
And the middle numbers as yellowish to orange and
there's a whole scale.
And again, in the exercise we will go into more detail and
also about examples of how to deal with examples that have
outliers with numbers which are way way above or
below the regular
range of numbers, but immediately you can see that
this is a very good way to detect anomalies and states in
this case, which have much lower profitability or
much higher profitability and I can when I filter it.
You can see that it of course it responds immediately, and
it's very, very easy to detect which are the good and
the bad and the average.
The grand total is no problem.
I actually applied it to the grand total,
because the grand total is kind of the average margin, for
all the data that we see.
So we covered some of the really powerful additions
to the pivot table by applying calculated fields and
conditional formatting on the pivot.
See you on the next one.

You might also like