Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
Need to generate Periods for date field by taking each period as 2 weeks
[like
1,2 ---> P1
3,4 ---> P2
5,6----> P3
7,8 ---> P4
9,10 ----> P5
11,12 ----> P6
13,14----> P7
15,16---> P8
]
Regards
John
Have a look a Mapping Load Techniques
http://www.quickintelligence.co.uk/applymap-is-it-so-wrong/
attached a tutorial link
Hi John, quick answer will be:
create a field like: Ceil(Week(DateField)/2) & 'P'
but for some dates like '01/01/2012' it will return 26 (as 01/01/2012 is part of the week 52 of 2011)
If you want to start like 01/01/year will be always in week 1, you can use:
Ceil(Floor(DayNumberOfYear(DateField) + WeekDay(YearStart(DateField))/7)/2) & 'P'
Hi,
you can have a more column in your table called WEEK
then load a inline with two column WEEK and Period assign values like below
and use Period for rest of the calculation
l
LFET JOIN(DATE_TABLE) //(your table)
PERIOD:
LOAD * INLINE [
WEEK,PERIOD
1, P1
2, P1
3, P2
4, P2
5, P3
6, P3
7, P4
8, P4
9, P5
10, P5
11, P6
12, P6
13, P7
14, P7
15, P8
16, P8
];
Is your problem resolved ??
Hi
Use if Condition
If(Week>=1 and Week <2 ,'P1',
If(Week>=3 and Week <4 ,'P2'))
Like this
or
u can use the inline table or use the interval match function..........
Not yet i am working on that