Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more...

22
Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows G/L History for all income statement accounts. This information is a great source of review when creating financial budgets, or reviewing General Ledger Detail as posted to certain Job Records. With the use of “Slicers”, we can select accounts, dates and jobs. These items may be selected individually, or for multiple records. Here is an example of all G/L activity in the 4000 – Income account for the dates between 01/01/11 and 12/31/11:

Transcript of Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more...

Page 1: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

Power Pivot 2

In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010.

The Sample Report shows G/L History for all income statement accounts. This information is a great

source of review when creating financial budgets, or reviewing General Ledger Detail as posted to

certain Job Records.

With the use of “Slicers”, we can select accounts, dates and jobs. These items may be selected

individually, or for multiple records.

Here is an example of all G/L activity in the 4000 – Income account for the dates between 01/01/11 and

12/31/11:

Page 2: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

This PowerPivot example will pull data from 3 tables.

Jobs : for the Job ID and Description

Accounts : for the G/L account Number and Description

G/L History for the Amounts posted to the G/L on a particular date.

Begin by selecting PowerPivot on your toolbar. (If it is not available, please refer to the previous

Webinar on how to install the add-in).

Access File – Get External Data from Database – From SQL Server

Enter the appropriate login information, selecting the SQL server name. Log On to the servier using SQL

Server Authentication – Save the Password. Finally Select the Database. Click NEXT to continue.

Once you have successfully logged in, choose:

“Select from a list of tables and views to choose

The data to import”. Click NEXT

Page 3: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

For this lesson, we will select the following tables:

ACCOUNTS

JOBS

GL_HISTORY

When you are finished selecting the desired tables, click Finish. The Table Import Wizard will show that

all of the tables have been imported.

Click Close to move to the next step.

Page 4: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

The Preview screen will show the selected Tables.

From the Main toolbar, select Table – Table Properties.

Deselect the checkbox in the upper left hand corner to disable all of the fields within the table.

Page 5: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

With all of the fields deselected, you may now choose the items you wish to use in the report. In this

example, we will choose:

account_id

description

Use the Dropdown arrow to the right of the account_id field to select only the Income Statement

accounts. Unfortunately, there is not a filter option to select items that are “greater than 4000”, so

these need to be manually selected when using the wizard.

You may use a combination of the down arrow and the space bar to select the appropriate accounts.

Once these items are selected, the list should now begin with the desired account_id.

With these items selected, Click the SAVE button in the lower right.

Page 6: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

Access the JOBS table in the lower left hand section of the table preview window.

From the main toolbar choose TABLE – TABLE PROPERTIES

Again, deselect all of the fields by unchecking the checkbox in the upper left hand corner.

From this table, select :

Description

Job_id

Click the SAVE button to return the data to the Table Preview window.

Page 7: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

Finally, we will select the following items from the gl_history table.

date_booked

amount_cr

amount_db

description

journal_id

job_id

basic_account_id

We will repeat the process of selecting only the income statement accounts from the basic_account_id

field.

Page 8: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

Another filter we will enable on this query will be deselecting the CLS or Closing journal. When looking

at G/L history, you will want to exclude the CLS journal, otherwise the history for a particular fiscal

period in a given income statement account would net to $ 0.00.

Once the field filters have been enabled, your table preview should look like the example below. If it

needs further tweaking, access TABLE – TABLE PROPERTIES from the main toolbar to make changes.

Page 9: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

Selection and filtering of the tables and fields is now complete. At this point we are ready to clean up

the fields.

Select the accounts table from the tabs in the lower left hand corner.

IN the first available row under the word ADD COLUMN, enter the following equation.

=accounts[account_id]&" - "&accounts[description]

You can easily do this by entering the = sign in the formula bar,

Then click on the first row under the account_id column header.

Type in &” – “& (this will separate our fields with a dash)

Finish by Clicking on the first description row under the description column heading. Then click the

CHECKBOX to the left of the formula toolbar.

The result will be a combined or concatenated field for the account_id and thedescription.

Double click on the CalculatedColumn1 header and change the text to Account.

Page 10: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

We will repeat the same process to combine the job_id and the jobs.description fields.

=jobs[job_id]&" - "&jobs[description]

Since we are looking for cumulative balances in the accounts we need to net the debit and credit

amounts together.

Access the gl_history tab and in the formula toolbar for CalculatedColumn1, enter the following

equation:

=gl_history[amount_db]-gl_history[amount_cr]

Remember to click on the cell references to ease entry of the equation.

This equation will work fine for the expense accounts, but for the income accounts, we will have to

enter a conditional IF/THEN statement to ensure the amounts that are a credit balance will show as

positive numbers.

With the sample chart of accounts shown, the income or sales accounts all begin with 4. So the

equation would read, if the account number begins with 4, then subtract amount_cr from amount_db,

otherwise subtract amount_db from amount_cr.

Here is the equation as it should be written in the equation editor. You may need to change the “4”

based on your chart of account.

=if(left(gl_history[basic_account_id],1)="4",gl_history[amount_cr]-

gl_history[amount_db],gl_history[amount_db]-gl_history[amount_cr])

Page 11: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

Verify the equation by looking at some data in the income or sales account numbers.

We will add another column to consolidate the dates by month for the activity. This will change the

date_booked field to the last day of the month in the particular field.

We will use the EOMONTH formula (end of Month). This formula requires an index number (the “,0”

part of the equation). This may be used to sequence the end of the next month by using a 1. In this

example, we are coding to the end of the date_booked month, so the sequence will be “0”.

=eomonth(gl_history[date_booked],0)

The data set is ready to create the relationships between the tables. In this example, we need to link

the account_id – description to the gl_history.basic_account_id and the job_id-description to the

gl_history.job_id field.

From the main toolbar, access TABLE – RELATIONSHIPS – CREATE RELATIONSHIPS

Page 12: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

We will link the gl_history table / job_id to the jobs table / job_id. Click CREATE to enable the

relationship.

We will also create the relationship between the gl_history table /basic_account_id and the accounts

table /account_id fields. Even though these fields are not named the same, they are, in fact the same

thing. The basic_account_id in the gl_history table is the information that is the “root” account if your

company is divisionalized. (NOTE: for divisionalized companies, the full_account_id field is the field that

carries the account_id and the divisions in a single field).

Now that the tables and fields have been selected and filtered, we can create the report.

From the main toolbar, select VIEW – PIVOTTABLE.

Create the PivotTable in a New Worksheet.

Page 13: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

We get a preview of the available items in the FIELD LIST for the PivotTable in the upper right hand

corner.

PivotTable Field List

You may expand the tables

within the PivotTable Field List to

see all of the items that may be

included in the report.

Page 14: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

In the VALUES section, drag and drop the AMOUNT field from the gl_history table.

In the ROW LABELS section, drag and drop the ACCOUNT field from the accounts table.

In the SLICERS VERTICAL section, drag and drop the JOB field from the jobs table.

In the SLICERS HORIZONTAL section, drag and drop the MONTH YEAR field form the gl_history table.

Double Click the SUM OF AMOUNT column in the PivotTable to Change the title. Change the Custom

name to “AMOUNT_”. Be sure to put a SPACE after the name to ensure that it is a “unique” value. If

you do not put a space after the title, it will not “see” it as unique.

Also – select the Number Format to change to format to Accounting.

Page 15: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

You may now use the SLICERS to view individual history by job.

Select a single date form the MONTH YEAR slicer to see the monthly activity for the selected job.

Use the CLEAR FILTER button(s) to reset the report.

Page 16: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

You will notice that the dates are cut off in the slicer. This is because the format of the slicers is pre-

coded. To make a change to the format, right click on the slicer, select SIZE AND PROPERTIES

Click on the POSITION and LAYOUT

Change the Number of Columns from 7 to 6.

Once the desired number of columns is set – make sure to check the DISABLE RESIZING AND MOVING

option, otherwise the number of columns will reset when you refresh the report.

Page 17: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

You may now use the Slicer to select a full year of activity for the selected accounts.

Add the MONTH YEAR field to the ROW LIST IN THE PIVOT TABLE to see month-by-month activity in the

accounts.

Page 18: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

You may also add the Journal as an additional Slicer to review the data by Journal Type.

Click inside the PivotTable and select OPTIONS from the PIVOTTABLE TOOLS tab.

Select Insert Slicer and ….Insert Slicer

Click OK to insert the slicer.

Page 19: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

Resize and Position to your needs.

Page 20: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

Here is an example of the PivotTable using the MONTH YEAR value as column headings.

Remember to SAVE YOUR CONNECTION SETTINGS.

From the DATA tab, select CONNECTIONS. Highlight the PowerPivot Data item and click properties.

Page 21: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

SAVING THE PASSWORD

On the USAGE tab, select RESFRESH DATA WHEN OPENING THE FILE. On the DEFINITION tab, select

SAVE PASSWORD.

Page 22: Power Pivot 2 - foundationupdates.com · Power Pivot 2 In this session, we will explore some more options available with the PowerPivot plug-in for Excel 2010. The Sample Report shows

For anyone who watched the webinar and saw me lose connection to the database, I found the solution:

If you lose connection, or the PivotTable will not refresh, Access the PowerPivot screen and select TABLE

– EXISTING CONNECTIONS.

Click on the EDIT button to open the existing connection.

Re-enter the password and click SAVE. This allowed me to access the database again.