Pivot Table + Microsoft Query + Current Month

  • Thread starter Thread starter THE_RAMONES
  • Start date Start date
T

THE_RAMONES

I automate most of my reports using pivot tabes... I use multiple criteria in
the backend such as >=date() -1, like f*, etc... Anyways, is there a function
I can place in crerita to give me current month... I would like to make my
pivots a bit more dynamic.. Source data is either SQL Server 2005 or Access
Databases...

I know I can do it on database end when creating the views/queries however I
would like to see if I can do it at the Excel end as well.. I appreciate the
help

Ramon
 
Hi,

That depends on how your months are stored:

You could use =MONTH(TODAY()) this gets you the month number of the current
month

You could use >EOMONTH(TODAY(),-1) and <=EOMONTH(TODAY(),0)

this function is part of the analysis toolpak.

Or you could use
=DATE(YEAR(TODAY()),MONTH(TODAY()),1) and <=DATE(YEAR(TODAY()),MONTH(TODAY())+1,1)-1

If this helps please click the Yes button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top