Solved

Excel Pivot Table

Posted on 2012-03-12
9
200 Views
Last Modified: 2012-03-12
Hi all

I have an excel Spreadsheet that is connected to a SQL Database. it has a list of orders on it that go back to 2009.

I would like to base a pivot table on the data but was wondering how i could make the pivot table automatically change if say i added date filters on the raw data on sheet 1 how could i make the pivot table reflect these changes also on shhet 2.

Thanks

John
0
Comment
Question by:pepps11976
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 37709056
Which version of Excel?

Unless you specifically need to filter the raw data as well, I would suggest simply filtering the pivot table directly. If you do need to filter the raw data too, you will probably need code - in which case we would ideally need a sample workbook to see the data layout.
0
 

Author Comment

by:pepps11976
ID: 37709076
Its the 2007 version.

basically a users filters the report every month to send to our customers so generally they would filter for the current month.

And so i would like the pivot table to reflect the change.

John
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 37709080
Would it not make more sense to have the source query filtered? Then you only have the required data in the file and the pivot table is always current.
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:pepps11976
ID: 37709094
I did try that i filtered the source data on last month a nd created a pivot table, then i changed the filter on the source data to current month but the pivot table stayed the same.

the user would be changing to the current month every month

John
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 37709108
I mean the source query not the data in the workbook. You would then simply need to refresh the pivot table.
0
 

Author Comment

by:pepps11976
ID: 37709120
Yes i see what you mean.

only then it would mean myself having to re query the sql data every month, not really ideal.


John
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 37709125
Do you not have to do that anyway to make sure the data is up to date?
0
 

Author Comment

by:pepps11976
ID: 37709129
The Sql Data is connected to a foxpro table, the sql query is refreshed every 20 mins.

And the SQL query has data init that goes back years, it has all order history etc, so i use excel to pnly pick out the information that i need.

John
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 37709147
What I am really suggesting is a SQL query that returns only a specific month's data based on a parameter. You could then use an Excel cell as the parameter value so that the table in Excel only has one month's data in it, so just refreshing the pivot table will keep it up to date. You could alternatively base the pivot directly on your SQL data and not store the data on a sheet at all (depends if you need that detail).
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question