Focal Point
[CLOSED] Previous Year, Period, Weeks from TIME DIMENSION

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/615101484

July 09, 2010, 10:31 AM
Arif
[CLOSED] Previous Year, Period, Weeks from TIME DIMENSION
Are there any previouse year, period week functions available in webfocus to use with time dimension to get previose year period and weeks?
 
I have two tables
Sales(TIMLKEY, Store, Sale Amounnt)
TIME [TIMLKEY, FY(TEXT), Period(TEXT), WEEK(TEXT), DATE(DATETIME), FYPW(TEXT), FYP(TEXT)]

FY = FISCALYEAR 2010, FYPW = FISCALYEAR PERIOD WEEK   SAMPLE:  2010121

I Hardtime manipulating time I would appriciate if someone can give me a clue/Hint for calculating previose periods that are in text format in my time table:

My Reprot looks like this


								      My Report should determin the what week of current period
								      Current week = previose week Before sat

Store	Pervious period 3          Pervious period 2   Pervious period 1           CurrentPeriod Week1    CurrentPeriod Week2   CurrentPeriod Week3

1	Sum(Sales)		Sum(Sales)	Sum(Sales)		Sum(Sales)		Sum(Sales)	Sum(Sales)
2	Sum(Sales)		Sum(Sales)	Sum(Sales)		Sum(Sales)		Sum(Sales)	Sum(Sales)

 

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.10
Windows
HTML
July 09, 2010, 10:51 AM
Dan Satchell
Click on the "Search the Technical Documentation Library" link in the very top-right corner of this forum page and search for "datetime funtions" in the Technical Documentation box.


WebFOCUS 7.7.05
July 09, 2010, 11:26 AM
Lloyd
Arif, those don't seem to be "REAL" dates so date functions wont work with them correctly.

Couldn't you just manipulate the numbers separately to achieve what you want? We have similar needs over here and I found it easier to create vars and do the math myself and build variables that combine those pieces to use for my selections.

In our case, since our reporting is based on different calendars, (normal calendar, fiscal calendar and retail calendar) we created a file that stores the actual dates as well as the different pieces we need for the other calenders , (Fiscal year, fiscal quarter, retail year, retail period, etc.). This works for us because our system also uses this data to build our DW files, in which all of the dates get converted to the particular calendar the file will be reporting on. IE. If the DW file is going to be used for retail reporting, all the dates will be converted to the retail calendar which is Year, Season, quarter, period, week, and day. so today would be converted to: 20100709 -> year:2010 Season:1 Quarter:2 Period(month):6 Week:1 Day:6.

In your case however, you may need to do the reverse. Get your date parts together and then convert them to an actual date and use that to do your selections, etc.


Lloyd Prendergast
Michael Kors (USA), Inc.
Phone: 201-453-5076
Fax: 646-354-4776
Lloyd.Prendergast@Michaelkors.com


WebFOCUS 523
WebFOCUS 7.6
WebFOCUS 7.7

Windows Server 2005
Windows Server 2008

Iseries V5R3M0
Iseries V5R5M0
Iseries V6R1M0
July 09, 2010, 02:06 PM
FrankDutch
there is a great book available handling 1001 things about dates in webfocus.
It coasts something like 25 U$ and worth all of that.
you should buy it and you can solve all these things and many more




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7