ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Microsoft Query & Pivot table? (https://www.excelbanter.com/excel-discussion-misc-queries/134179-microsoft-query-pivot-table.html)

Mark J

Microsoft Query & Pivot table?
 
I have created 2 pivot tables in an excel workbook.

1. The first pivot table brings in values from midnight to 6am.

2. The second pivot table brings in values from the previous 5 days.

My question is how do i state the [Date] criteria in Microsoft Query to
include the last 5 days but not today?

Right now I have a field called [Date] and the criteria is set as;
[=getdate()-5]

this works, but i do not want today's values. Any ideas?



Debra Dalgleish

Microsoft Query & Pivot table?
 
Use an And in the criteria, e.g.: =date()-5 And <date()

Mark J wrote:
I have created 2 pivot tables in an excel workbook.

1. The first pivot table brings in values from midnight to 6am.

2. The second pivot table brings in values from the previous 5 days.

My question is how do i state the [Date] criteria in Microsoft Query to
include the last 5 days but not today?

Right now I have a field called [Date] and the criteria is set as;
[=getdate()-5]

this works, but i do not want today's values. Any ideas?




--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 02:35 PM.

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