Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to create a quater with out using 'Q' &ceil (month(date)/3) and inline function ?
check this out, it could help you.
greetings!!
brother i am dealing with personal edition , so can i have same code on the wall
Usually, we load a table with the quarter and the month number with the statement INLINE
LOAD * INLINE [
month, quarter
1,1
2,1
3,1
4,2
5,2
6,2
7,3
8,3
9,3
10,4
11,4
12,4];
ok, I get that but, if you load an inline statement like the above example, you will get the field quarter automaticlly, you don´t need to creat a new quarter becouse you have it already. or try to post your script to check it out.
in the attached application: you can do quartername(Date) as quarter. I prefer the inline solution: less loading time.
I thanks for your hospitality, It help me find the other aspect of the coding
Thank you very much , I worked on it and working out. EvaPolini i am trying to figure out via some sort of string or mapping procedure other than inline and
Dear Friends, Iwould thanks for the support to figure out the way in creating quater.
I love to share the way of creating quater via mapping concept.
Month_des:
Mapping Load * Inline
[
Map_id,MAp_status
1,Q1
2,Q1
3,Q1
4,Q2
5,Q2
6,Q2
7,Q3
8,Q3
9,Q3
10,Q4
11,Q4
12,Q4
];
Directory;
Sales:
LOAD [Transaction ID],
Year,
Month,
ApplyMap('Month_des',Month) as Month_desc,
Day,
[Salesman ID],
[Product ID],
[Serial No],
[ID Customer],
[List Price],
Sales,
[Gross Margin]
FROM
[Tutorial\Application\Data Sources\TRANSACT.CSV]
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);