Report filter question

hiwelcome

Registered User.
Local time
Today, 15:13
Joined
Aug 14, 2015
Messages
47
Hello,

I am creating a YTD sales report based off a query that has a date field (1/1/2016, 5/24/2016, etc.) I would like to have two separate dollar total text boxes - one for January-June and one for July-December. I am familiar with applying a filter to a whole report, but have never tried to filter this way. Can I use syntax to filter for each half year time period in the record source of the dollar total text boxes? Or is there a better/easier way to do it?
 
use conditional SUM as your recordsource for the textboxes:

for jan-jun textbox:
=SUM(IIF(Month([datefield])<7,[fieldToSum],Null))

for jul-dec textbox:
=SUM(IIF(Month([datefield])>6,[fieldToSum],Null))
 

Users who are viewing this thread

Back
Top Bottom