©2017 Shelby Systems, Inc. Other brand and product names are trademarks or registered trademarks of the respective holders.
Excel PivotTables for Data Trends and Insights (Course E14)
Presented by: Mark Crain Shelby Staff Trainer
2
Table of Contents What is a Pivot Table? ................................................................................................................................................. 3
How do I get to Shelby data? ...................................................................................................................................... 5
Ctrl‐P Export Grid ........................................................................................................................................................ 6
Report Output to File (Shelby v.5) .............................................................................................................................. 7
Report Output to File (Shelby Arena) ......................................................................................................................... 8
Export from Reports in ShelbyNext | Financials ......................................................................................................... 9
Arena List Export to Excel ......................................................................................................................................... 10
Export CSV from ShelbyNext | Membership ............................................................................................................ 11
Insert a PivotTable Using Any Worksheet Data ........................................................................................................ 12
ODBC Connection ...................................................................................................................................................... 13
ShelbyQUERY Create Excel PivotTable ...................................................................................................................... 14
Drag and Drop the Fields to the Regions of the PivotTable ..................................................................................... 15
Group a Column or Row Value ................................................................................................................................. 16
Name and Format the Values ................................................................................................................................... 17
See Multiple Aggregations ........................................................................................................................................ 18
Use Window Functions ............................................................................................................................................. 19
Sort and Filter Using Drop‐Down Options ................................................................................................................ 20
Add Slicers in Excel 2013 and later ........................................................................................................................... 21
Add Slicers ............................................................................................................................................................. 22
Visualize the Data with PivotChart ........................................................................................................................... 23
Questions and Answers ............................................................................................................................................ 24
Discussion.................................................................................................................................................................. 24
3
What is a Pivot Table?
A pivot table is a structure that aggregates values by one or more columns in a table. It is a powerful analysis
tool, effective in summarizing data. Excel has a native support for pivot tables that it calls PivotTable (all one
word). An Excel PivotTable has four sections: A filters area for columns used as master filters for all other data in
the output, a columns area for the columns that serves as labels across the top of the output, a rows area for
the columns that serve as labels for the rows in the output, and a values area that is for the columns aggregated
in the output.
In the example above, you see an Excel PivotTable based on Accounts Payable information. The filters area holds
the Bank Account column so that the PivotTable is filtered easily to one single bank account. The columns area
has the Inv Date column, which normally shows a specific date but for this example is grouped by month and by
year. The rows area has the Vendor column so that each row represents one vendor. The values area has the
Amount column so that in each month you can see the total of all invoices for each vendor.
4
A PivotTable is a tool to transform detail (or scalar values) and group this into aggregates. That is to say, when
you have a list like the one shown above, you can group each value by common types.
You might sum all activity for a single vendor. You might further sum that activity by time periods (such as
months or years). You might instead decide you need to show the average spent with that vendor during a year.
You could use this to track contributions, sum up gifts by person or by fund, and further sum that by month or
year. You could instead show the largest or latest gift to that fund or by that person.
You can also change (or Pivot) this grouping quickly right in the report.
5
How do I get to my Shelby data?
The following pages show examples of each approach above. For the two methods that can automatically refresh
the data (ODBC Connection and ShelbyQUERY Create PivotTable), you need to have login credentials ready to
make the connection.
The available user names for v.5 and the default passwords are:
Login ID Read Only Access to Default Password
ShelbyRead All data except CN, GF, and PR SsI-01-Rd-xxxxx
ShelbyCN All data except GF and PR SsI-01-Cn-xxxxx
ShelbyGF All data except CN and PR SsI-01-Gf-xxxxx
ShelbyPR All data except CN and GF SsI-01-Pr-xxxxx
For each password replace the xxxxx with your customer number, padded with zeroes at the beginning, if
needed, to make a five‐digit number.
In a locally‐installed version of Arena or ShelbyNext | Financials the user name is ArenaReports, and the
password is different for each customer, so refer to your own administration information.
6
Ctrl‐P Export Grid
Almost any grid of data in Shelby v.5 can be exported using the Ctrl‐P key combination.
1. Open up any inquiry or other screen that displays the information in a grid.
2. Click once in the grid of results and then press Ctrl‐P.
3. Click No to export the data to Excel.
4. (Not Shown) Click the button to close the print preview mode in Excel.
5. (Optional – Not Shown) Delete column A from the Excel worksheet because it has no label and contains nothing helpful for the data analysis.
7
Report Output to File (Shelby v.5)
There is a variety of ways to get data out of Shelby v.5 into Excel, but the tricky part is getting a report that is
formatted properly to be a standard table with well‐defined rows and columns.
In Selections & Listings, the Word Processing Interface output is a good choice because it is designed to get the data out in a specific format (one‐row‐per‐person), which is often the desired arrangement. Be sure to include the field names in the first record to make it easy to transform into a PivotTable without a lot of editing. If you are doing Contributions analysis, be sure to check also the box to include contributions/pledge information.
The Formatted Report is also a good Selections & Listings choice. Change the output option to Print to File and make sure to check the box to include the field names in the first record. In addition, a good practice is to change the file extension on the file name to .csv instead of .txt. That way Excel opens up when you double‐click on the file.
Some financial reports include an Export to Excel option (not shown), and you can try to use that. Unfortunately, most reports with that feature have formatting (headers, subtotals, etc.) that makes it unsuitable as a source for a PivotTable.
If the report you want has no export option, you can always use the File ‐‐> Save As… ‐‐> Comma Delimited File option. There are probably extra rows to delete with header or footer information, but if the output is otherwise well formatted, then it should not be a difficult process to prepare the data for use in a PivotTable.
8
Report Output to File (Shelby Arena)
Any report in Reporting Services can be exported to CSV or directly to Excel. CSV is usually a better option
because it eliminates the problems with formatting that can prevent the data from being well formed as a table.
9
Export from Reports in ShelbyNext | Financials
On any report screen in ShelbyNext | Financials, you can export in a variety of file formats. Some reports work
better as an export, but most require some cleanup to be used as a PivotTable.
You can export the file as an Excel export or as a CSV export, but a CSV export is most likely going to work best
for creating a PivotTable.
10
Arena List Export to Excel
After defining a list that returns the data you want to analyze with a PivotTable, run the list and then click the
Excel icon in the lower right corner.
11
Export CSV from ShelbyNext | Membership
ShelbyNext | Membership is only offered today in a SaaS model (Software as a Service) which means it is hosted
in the Cloud, and there is not currently a means to connect to the tables directly.
There are several reports or lists that allow for an export to CSV, which is easily opened in Excel.
You can take the raw data from the list or report and summarize based on the columns that you are given. For
example, you could take a list of Interactions and show how many Pastoral Care Visits (if this is a type you create)
occurred in each month or by each pastor or both.
12
Insert a PivotTable Using Any Worksheet Data
The one commonality with all the techniques you have seen for getting your data is that the end result is a
worksheet in Excel with your data in it. Once you have the data in a worksheet, you must take another couple of
steps to turn that data into a PivotTable.
1. Switch to the Insert ribbon.
2. Click on PivotTable.
3. Click OK on the window that pops up. All the default options work well.
This inserts a new worksheet into the Excel document with the PivotTable on it. The data remains on Sheet 1.
The next three techniques all create a PivotTable for you automatically. After you review the final three ways to
get your data into Excel, you go over the steps of populating the PivotTable with data.
13
ODBC Connection
1. In Excel switch to the Data ribbon. 2. Click From Other Sources. 3. Click From SQL Server. 4. Provide the SQL Server name, including the instance name. 5. Provide the user name and password. 6. Click Next. 7. Switch to the correct database (ShelbyDB or ArenaDB). 8. Select the table or view with the data you need. It is best to start with a view that already has all the data in one place, but you can build a result set from multiple tables using this tool. 9. Click Finish. (The “Next” option takes you to a page on which all the default options are fine.) 10. Select the form of output. You can get the data in table format, or you can jump directly to building the PivotTable report. 11. Click OK.
14
ShelbyQUERY Create Excel PivotTable
If you are working with data in Shelby v.5, this is the easiest way to make a PivotTable.
1. Work with the query editor to get a query with the data you want to analyze in Excel.
2. Click Load Grid to get the results.
3. Right‐click on the white grid of results and select “Create Excel Pivot Table…”
4. Provide the user name and password for the appropriate account. If the credentials are already populated, just click OK.
15
Drag and Drop the Fields to the Regions of the
PivotTable
Since Excel 2010, the easiest way to populate the PivotTable with data is to drag and drop the selected fields
into the four panes at the bottom of the field list; these four panes represent the four regions of the PivotTable.
Before Excel 2010 you would drag the field directly onto the PivotTable region, but that was sometimes tricky,
and people would often “drop” the column in the wrong region. Using the four panes beneath the field list is
much easier.
16
Group a Column or Row Value
If the native values of a column or row label need to be grouped in order to be helpful, just right‐click on any of
the individual label values and select “Group…” If the value is recognized as a number or a date, the grouping
tool gives you automatic prompts for logical groupings.
If the value is not a date or a number, you can still manually group values by multi‐selecting a range, right‐
clicking, and selecting Group.
You can turn off grouping by selecting the Ungroup… option.
17
Name and Format the Values
Excel uses generic descriptions for the labels of the data, such as “Sum of Amount.” If you want to give a more
meaningful description, open the Value Field Settings and give a custom name to the field.
If you are working with currency values, you probably should change the number format so that it looks right.
This is also in the Value Field Settings. Click the “Number Format” button to open up a window that lets you set
the format of numeric output.
18
See Multiple Aggregations
You can drag the same field into the Values section more than once, and you can use the Value Field Settings to
set a different aggregate function under the section called “Summarize value field by.”
In the example above, the GiftAmount column is used three times: Once for the sum (Total Giving), once for the
count (# of Gifts), and once for the average (Average Gift).
The most commonly used aggregate functions supported in a PivotTable are:
Sum
Count
Average
Max
Min
19
Use Window Functions
Window functions allow the results of a calculation to be based on values outside the current scope of values.
To use window functions, open the Value Field Settings and switch to the “Show Values As” tab. Then change
the drop‐down option to the appropriate function. The most commonly used are listed below:
% of Column Total
Difference From (Select the Base Item to define what to use for the comparison.)
Running Total In (Select the Base Field to define which row labels to show as a running total.)
Rank Largest to Smallest
Rank Smallest to Largest
20
Sort and Filter Using Drop‐Down Options
The “Column Labels” label and the “Row Labels” label both have drop‐down arrows next to them. When you click
on one, you get sorting and filtering options for the columns you used for those labels.
21
Add Slicers in Excel 2013 and later
Slicers let you filter the results using floating windows that show you the selected filter values at all times. Plus,
the slicers are interactive, so that if you apply a filter that reduces the number of valid choices on a second slicer,
the invalid slicer options are greyed out.
Although Power Pivot has supported slicers since their introduction in Excel 2010, standard PivotTables have not
had them as an option until Excel 2013.
To add a slicer:
1. Click on the Insert ribbon.
2. Click the Slicer button.
3. Put a checkmark beside each column that you want to use as a slicer.
4. Click OK.
22
Add Slicers
In the example above you see that two slicers are added: One for years and one for the purpose descriptions.
Clicking the year 2015 limits the PivotTable to just the selected year, and the purpose description slicer has
greyed out all the purposes that have no giving in the selected year.
23
Visualize the Data with PivotChart
PivotChart can turn the numbers into colorful visualizations of the data. PivotChart also supports slicers, so you
can dynamically filter the chart and do comparisons easily.
To add a PivotChart, click on the Analyze ribbon of the PivotTable Tools ribbon grouping and then click
PivotChart.
The “rows” section of the PivotTable become the X‐Axis of the PivotChart (assuming it is a bar graph of some
sort) and the “values” section is the Y‐Axis. If you have column labels, they are treated as sub‐divisions of the
X‐Axis values. You may need to rearrange the rows and groups columns in order to achieve the desired
visualization for the chart. Any adjustments you make to the underlying PivotTable have an effect on the related
PivotChart.
24
Questions and Answers
Discussion
Mark Crain Shelby Staff Trainer
Prior to joining Shelby as Staff Trainer, Mark served in various roles in the fields of education
and banking while obtaining his MBA in Business Management. Each of his positions revolved
around the training or teaching of students and professionals. Currently, Mark trains on Shelby
v.5 and ShelbyNext.