Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How do I get running 12 months of data using date filter?

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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,355
Default How do I get running 12 months of data using date filter?

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!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How do I get running 12 months of data using date filter?

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!

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I get running 12 months of data using date filter?

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!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default How do I get running 12 months of data using date filter?

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 months prior and 3 months post a date renee Excel Worksheet Functions 2 May 2nd 08 05:46 PM
filter data by date AOU Excel Discussion (Misc queries) 1 September 26th 07 10:58 PM
Filter date time data Zoe Excel Discussion (Misc queries) 1 August 1st 07 12:16 PM
Running total of last 6 months in rows 3tree Excel Discussion (Misc queries) 0 September 25th 06 10:31 AM
Fiscal year total from running 12 months Excel Worksheet Functions 2 February 9th 05 12:11 AM


All times are GMT +1. The time now is 09:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"