March 2, 2009 at 2:15 am
Hi,
I have a report which I have on my Filter 'Current Month', hence when a month changes teh report is blank, I would like to show at least one week of data when the month changes, hope there is someone which could help me.
I have tried DATEADD and IF functions but without any success.
Thanks in advance
All help and Any help
March 2, 2009 at 7:26 am
Can you post the code you are using?
How are you currently implementing Current Month?
What are your data structures?
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 2, 2009 at 7:56 am
Hi,
I been using 'Simple Date in month to date',
also used
AND(Simple Date >= DATE(YEAR(TODAY()), MONTH(TODAY()), 1), Simple Date < DATEADD(DAY, 1, TODAY()))
but what I really would like is that on March 1st the report won't be blank (not a live report) but give me at least the last 7 days, possibly using 'Simple Date', something in the lines of;
IF today() < 7 (seventh day of the month) , show me the last 7 days, otherwise show me current month to date.
Hope this makes sense...
🙂 Many Thanks
All help and Any help
March 2, 2009 at 8:32 am
For readability I would probably put this in Custom Code. Something like this:
Function GetStartDate() as Date
' if the first of the month get last seven days
If Today.Day = 1 Then
Return DateAdd(DateInterval.Day, -7, Today)
Else
' get the first of the month.
Return DateAdd(DateInterval.Day, -Today.Day + 1, Today)
End If
End Function
Then in the dataset:
Where [Simple Date] >= Code.GetStartDate
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
March 2, 2009 at 9:03 am
Thanks,
I won't have time to check it today, but I will check it tomorrow, and will let you know.
Many Thanks,
All help and Any help
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply