PC Review


Reply
Thread Tools Rate Thread

How do I get running 12 months of data using date filter?

 
 
68jcode
Guest
Posts: n/a
 
      13th Jan 2010
I am using Excel 2007 connected to a SQL DB and use pivot tables for
reporting purposes. I have multiple years worth of data that I access, but
want to limit my pivot table to display just the last 12 months. I can't
seem to find a way to do this, but am sure someone must have solved this
problem already. I consider myself pretty Excel savvy, but I'm no programmer
so hold the VB please.

Thansk!
 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      13th Jan 2010
Why don't you add a helper column that determines if the data is within the
last year.

Do something like
if(A1 > date(year(Today())-1,month(today()),day(today())), "YES","NO")

hopefully I have all of the parens. PUt that helper column in as a page
field.
--
HTH,

Barb Reinhardt



"68jcode" wrote:

> I am using Excel 2007 connected to a SQL DB and use pivot tables for
> reporting purposes. I have multiple years worth of data that I access, but
> want to limit my pivot table to display just the last 12 months. I can't
> seem to find a way to do this, but am sure someone must have solved this
> problem already. I consider myself pretty Excel savvy, but I'm no programmer
> so hold the VB please.
>
> Thansk!

 
Reply With Quote
 
68jcode
Guest
Posts: n/a
 
      13th Jan 2010
I can't do a helper column because the data is in a SQL DB that I am
accessing, not just in another worksheet that I can manipulate. Any other
thoughts?


"Barb Reinhardt" wrote:

> Why don't you add a helper column that determines if the data is within the
> last year.
>
> Do something like
> if(A1 > date(year(Today())-1,month(today()),day(today())), "YES","NO")
>
> hopefully I have all of the parens. PUt that helper column in as a page
> field.
> --
> HTH,
>
> Barb Reinhardt
>
>
>
> "68jcode" wrote:
>
> > I am using Excel 2007 connected to a SQL DB and use pivot tables for
> > reporting purposes. I have multiple years worth of data that I access, but
> > want to limit my pivot table to display just the last 12 months. I can't
> > seem to find a way to do this, but am sure someone must have solved this
> > problem already. I consider myself pretty Excel savvy, but I'm no programmer
> > so hold the VB please.
> >
> > Thansk!

 
Reply With Quote
 
Paullyie
Guest
Posts: n/a
 
      13th Jan 2010
Hi,

Not sure if this will help, but worth a try.
How exactly are you accessing the information in the SQL DB, I'm assuming
you are using the Microsoft Query through ODBC etc...?

If so, you probably have a field available with a date of transaction,
restrict this field with a filter

In excel right click on the data you are accessing from SQL, and select
'Table' then 'edit query' this will bring up a query wizard.
CLick next and go to the 'Filter Data' screen, here you can select your date
field and apply the criteria to restrict it to the year you require.

Hopefully this will help, if not could you provide a bit more info on how
your data is extracted from SQL

Cheers

"68jcode" wrote:

> I can't do a helper column because the data is in a SQL DB that I am
> accessing, not just in another worksheet that I can manipulate. Any other
> thoughts?
>
>
> "Barb Reinhardt" wrote:
>
> > Why don't you add a helper column that determines if the data is within the
> > last year.
> >
> > Do something like
> > if(A1 > date(year(Today())-1,month(today()),day(today())), "YES","NO")
> >
> > hopefully I have all of the parens. PUt that helper column in as a page
> > field.
> > --
> > HTH,
> >
> > Barb Reinhardt
> >
> >
> >
> > "68jcode" wrote:
> >
> > > I am using Excel 2007 connected to a SQL DB and use pivot tables for
> > > reporting purposes. I have multiple years worth of data that I access, but
> > > want to limit my pivot table to display just the last 12 months. I can't
> > > seem to find a way to do this, but am sure someone must have solved this
> > > problem already. I consider myself pretty Excel savvy, but I'm no programmer
> > > so hold the VB please.
> > >
> > > Thansk!

 
Reply With Quote
 
68jcode
Guest
Posts: n/a
 
      15th Jan 2010
Thanks for the response. This really doesn't help me as it's the same
concept as applying the filter on the "date created" field in my pivot table.
I'm not just trying to limit the date range to greater than, less than or
between etc., which are the typical filters. I need to just pull the last 12
months, which I'm assuming requires some logic or a calculation, which I am
not sure can be done in a pivot table. Any thiughts?


"Paullyie" wrote:

> Hi,
>
> Not sure if this will help, but worth a try.
> How exactly are you accessing the information in the SQL DB, I'm assuming
> you are using the Microsoft Query through ODBC etc...?
>
> If so, you probably have a field available with a date of transaction,
> restrict this field with a filter
>
> In excel right click on the data you are accessing from SQL, and select
> 'Table' then 'edit query' this will bring up a query wizard.
> CLick next and go to the 'Filter Data' screen, here you can select your date
> field and apply the criteria to restrict it to the year you require.
>
> Hopefully this will help, if not could you provide a bit more info on how
> your data is extracted from SQL
>
> Cheers
>
> "68jcode" wrote:
>
> > I can't do a helper column because the data is in a SQL DB that I am
> > accessing, not just in another worksheet that I can manipulate. Any other
> > thoughts?
> >
> >
> > "Barb Reinhardt" wrote:
> >
> > > Why don't you add a helper column that determines if the data is within the
> > > last year.
> > >
> > > Do something like
> > > if(A1 > date(year(Today())-1,month(today()),day(today())), "YES","NO")
> > >
> > > hopefully I have all of the parens. PUt that helper column in as a page
> > > field.
> > > --
> > > HTH,
> > >
> > > Barb Reinhardt
> > >
> > >
> > >
> > > "68jcode" wrote:
> > >
> > > > I am using Excel 2007 connected to a SQL DB and use pivot tables for
> > > > reporting purposes. I have multiple years worth of data that I access, but
> > > > want to limit my pivot table to display just the last 12 months. I can't
> > > > seem to find a way to do this, but am sure someone must have solved this
> > > > problem already. I consider myself pretty Excel savvy, but I'm no programmer
> > > > so hold the VB please.
> > > >
> > > > Thansk!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 months prior and 3 months post a date renee Microsoft Excel Worksheet Functions 2 2nd May 2008 05:46 PM
filter data by date =?Utf-8?B?QU9V?= Microsoft Excel Misc 1 26th Sep 2007 10:58 PM
Data entry connected to daily date (over multiple months) =?Utf-8?B?VGVyYXRvZ2Vu?= Microsoft Access Database Table Design 1 17th Apr 2007 04:02 AM
getting last 6 months of data from todays date Addy Microsoft Access Queries 2 13th Dec 2006 08:56 PM
Report: Create for 12 months when some months data unavailable DMUM via AccessMonster.com Microsoft Access Reports 1 4th Jan 2006 05:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:22 AM.