Reader small image

You're reading from  Instant Creating Data Models with PowerPivot How-to

Product typeBook
Published inApr 2013
PublisherPackt
ISBN-139781849689564
Edition1st Edition
Right arrow
Author (1)
Taehyung Lee
Taehyung Lee
author image
Taehyung Lee

Leo Taehyung Lee is an outgoing individual with a diverse background and experiences. His studies in engineering along with the pursuit of a career in finance helped him work in various positions across diverse fields from R&D to patents as well as financial risk management. He has over 3 years of extensive experience in Excel, VBA, and is a Microsoft Certified Excel Expert in Excel 2010.
Read more about Taehyung Lee

Right arrow

Creating a pivot chart (Simple)


With small amounts of data, the pivot table is sufficient for most types of data. However, as the data get larger, it is much easier to represent the data using graphical methods such as lines, pies, and bars. The good news for us is that creating a pivot chart from a pivot table is very simple, and it is very easy to change and update fields as needed. We will make a number of different charts for the pivot tables created in the previous recipes.

Getting ready

To proceed with creating pivot charts, we need the source data first. Luckily for us, that would be the pivot tables created in the previous recipe.

How to do it...

As usual, we will build upon files from previous recipes and add the pivot chart so that we may see where the data comes from and why it is significant.

The following are the steps to create a pivot chart with the DatabaseData_v3.xlsx file, which results in the creation of the PivotChart sheet in it:

  1. Open the DatabaseData_v3.xlsx file again. Open the PowerPivot window and click on PivotChart (instead of the PivotTable button), located as a drop-down menu of the PivotTable button. Save it as New Worksheet.

    • Select CountryRegion | Name and move it under Slicers Vertical

    • Select StateProvince | Name and move it under Slicers Vertical

    • Select Address | City and move it under Slicers Vertical

    • Select BusinessEntityAddress | BusinessEntityID as Count of BusinessEntityID and move it under Values

  2. Then, rename each field accordingly (Country Name, State Name, and City Name), copy the highlighted chart, and paste it below as shown in the following screenshot:

  3. Change the chart type of the bottom chart to a pie chart.

  4. From here, there are three different types of reports that we can easily create.

  5. Place CountryRegion | Name under the Axis Fields area, and now we have a chart of number of clients per country, represented both as a bar graph and as a pie graph as shown in the following screenshot:

  6. Similar steps can be repeated for state/province and for city. Of course, because it will list all states for all the countries, the charts will be very disorganized. Play around with it and filter it to select only one country. For instance, Germany will appear as shown in the following screenshot:

  7. Once we are finished with changing chart types, filters, and other ways to create charts to represent the data, rename the sheet as PivotChart and save it and close.

  8. Certain chart types are more effective than others in representing a specific type of data. We have created a chart from the beginning here, adding and removing datasets just like the pivot table.

The following are the steps to create a pivot chart with the GDPData_v3.xlsx file:

  1. Open the GDPData_v3.xlsx file again. Click on the pivot table.

  2. Under the PowerPivot Tools | PivotChart option select a chart type. We will create a column chart first, then copy the chart, and change the second chart type to Doughnut. Change the doughnut's chart layout to Layout 3 and the result will be as shown in the following screenshot:

  3. The column chart shows the generally increasing GDP per nation, but the numbers for China are very small and hard to compare. The doughnut chart is more effective in showing the exponentially increasing GDP of China, but is still difficult.

  4. For each of the Sum of … column, change the Show Value As button as % of… with China as its base. This will display all other GDP as a percentage of China. The resulting bar graph shows that the GDP of China showed great growth year after year compared to other countries. It would appear as follows:

How it works...

We explored both ways of creating a pivot chart: from the PowerPivot window directly, and directly from the pivot table. Pivot charts, as evidenced, are very simple to create in the same fashion as the pivot table, but with a greater range of options for displaying the data in a meaningful manner.

The more qualitative data (DatabaseData.xslx) were focused on counting the numbers by the country, by the state, and by the city. This was achieved by setting one axis as one of these and filtering correspondingly. In our case, the pie graph was the most appropriate in showing the percentage of number of clients per region, allowing the user to make an intelligent business decision to focus marketing on other regions with less number of clients.

In the more quantitative data (GDPData.xslx), we focused more on the comparison between different variables over the years. China has shown strong growth, and Korea has got-along through the 2008 financial crisis due to its less financial-focused and more industrial-focused economy, which helps the user make an intelligent business decision to invest or not invest in different nations based on their growth and their resilience to a global financial crisis.

In addition, as seen in the GDP data, changes in the ways of representing data (percentage, and so on) are reflected in the corresponding pivot table charts. The combined representation of data using both a pivot table and a pivot chart enables the user to identify trends in percentage levels as well as on absolute levels.

There's more...

As an additional item, try switching the rows and columns by pressing the Switch Row/Column button under the PivotChart Tools | Design tab. This will put the years as rows and countries as columns, which shows an interesting difference in how the chart appears.

Also, if we need two different types of chart on the same page, we can simply create two separate pivot tables and charts, and then move the charts together onto another sheet to represent different sets of data, which refers to a similar set of data.

Previous PageNext Page
You have been reading a chapter from
Instant Creating Data Models with PowerPivot How-to
Published in: Apr 2013Publisher: PacktISBN-13: 9781849689564
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Taehyung Lee

Leo Taehyung Lee is an outgoing individual with a diverse background and experiences. His studies in engineering along with the pursuit of a career in finance helped him work in various positions across diverse fields from R&D to patents as well as financial risk management. He has over 3 years of extensive experience in Excel, VBA, and is a Microsoft Certified Excel Expert in Excel 2010.
Read more about Taehyung Lee