[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

LastFullWeek from Last year

Posted on 2002-07-25
5
Medium Priority
?
262 Views
Last Modified: 2012-08-14
I'm running a report which compares results from last week using the LastFullWeek function. However, i would like to compare the same week in last year. I have tried LastFullWeek-52 but without any luck.

***CURRENTLY***
If {SaleDate} = LastFullWeek
THEN {Transactions}

***I WOULD LIKE***
If {SaleDate} = LastFullWeek (IN THIS TIME LAST YEAR)
THEN {Transactions}


Any help is appreciated :)
0
Comment
Question by:m0ley
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 7177359
You can find the same week by

Dateadd ("W",-52,{SaleDate})

You can then use that in your if statement.

good luck
mlmcc
0
 

Author Comment

by:m0ley
ID: 7177422
hi mimcc,

thx for the quick response but,

Dateadd does'nt seem to function in formula editor
0
 

Author Comment

by:m0ley
ID: 7177618
i have managed to install the DateAdd function as i am using version 7. Only to find another error shows up. This time is states 'A date-time is required here'
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 656 total points
ID: 7178049
What does {SaleDate} look like.  It needs to be a DateTime.  If it is a string you can use CDate(SaleDate) to convert to a date.

Other options are
DateTime (YYYY,MMM,DD)
Date (YYYY,MMM,DD)

Look through the Date and Type Conversion functions in the formula editor.  Use the HELP to determine what each requires and expects.  You should be able to find a way to convert  to a datetime.

mlmcc
0
 

Author Comment

by:m0ley
ID: 7179672
mimcc,

CDate did not work, however DateTime works, and after a couple more hours trying to grab the whole week of last year, i have managed to get it working.... thx a lot for help!

much appreciated :)

m0le2000
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question