ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Pivot Table + Microsoft Query + Current Month (https://www.excelbanter.com/excel-worksheet-functions/209867-pivot-table-microsoft-query-current-month.html)

THE_RAMONES

Pivot Table + Microsoft Query + Current Month
 
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

ShaneDevenshire

Pivot Table + Microsoft Query + Current Month
 
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.
--
Thanks,
Shane Devenshire


"THE_RAMONES" wrote:

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



All times are GMT +1. The time now is 03:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com