Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have below script working fine :-
LOAD *,
applyMap('durationMap12', [No of Months_], '64 Mth and more') as Duration12_
;
Now it display in month, like 12-24 month , may i know how to make it display 2 year ?
Paul Yeo
Good Job for below one
You need to press control E.
But, The reason is I can't open your document now doe to client space. Try to paste script to offer
Hi Anil
Do you mean like below :-
durationMap:
MAPPING LOAD
rowNo() as key,
(((recno()-1)*3)+1) & '-' & (((recno()-1)*3)+3) & ' Mth' as label
AUTOGENERATE 20 //org 7
WHILE iterNo() <= 3
;
durationMap12:
MAPPING LOAD
rowNo() as key,
(((recno()-1)*12)+1) & '-' & (((recno()-1)*12)+12) & ' Mth' as label // org (12 for 1-12 mth) (3 for 1 to 3 mth)
AUTOGENERATE 5 //org (5 for 1-12 mth) ( 20 for 1-3 mth)
WHILE iterNo() <= 12 // org (12 for 1-2 mth) (3 for 1-3 mth)
;
LOAD *,
applyMap('durationMap12', [No of Months_], '64 Mth and more') as Duration12_
;
Not Exactly, You initial step from this?
Hi Anil
Thank you very much for your sharing.
My field [No of Months_] script as below :-
Ceil(Num(if(num(((date(today(),'DD/MM/YYYY') - date(@180:190,'DD/MM/YYYY'))/365))=0,1,num(((date(today(),'DD/MM/YYYY') - date(@180:190,'DD/MM/YYYY'))/365)))*12)) as [No of Months_],
How to change it ? so that it will display year ?
But, Here i haven't seen anything related this to next comment?
Yeo Poh sai wrote:
Hi Anil
Do you mean like below :-
durationMap:
MAPPING LOAD
rowNo() as key,
(((recno()-1)*3)+1) & '-' & (((recno()-1)*3)+3) & ' Mth' as label
AUTOGENERATE 20 //org 7
WHILE iterNo() <= 3
;
durationMap12:
MAPPING LOAD
rowNo() as key,
(((recno()-1)*12)+1) & '-' & (((recno()-1)*12)+12) & ' Mth' as label // org (12 for 1-12 mth) (3 for 1 to 3 mth)
AUTOGENERATE 5 //org (5 for 1-12 mth) ( 20 for 1-3 mth)
WHILE iterNo() <= 12 // org (12 for 1-2 mth) (3 for 1-3 mth)
;
LOAD *,
applyMap('durationMap12', [No of Months_], '64 Mth and more') as Duration12_
;
So, Let me access your file. For sure, Will help you meantime please release the business of your needed
Hi Anil
I am not sure what you mean on below :-
For sure, Will help you meantime please release the business of your needed
Paul
My question was "What you are trying and What this indicates to"
Hi Anil
Thank you very much for wanted to help me.
Since this is quite hard to explain in word.
it there any thing you need so that i can provide you.
Paul
will get back to you once i get access the file
PFA
Hi Anil
May be i not explain to you my requirement clearly . what i am looking for is instead of display 13-24 mth , i want it display 2 year.
As i have open the QVW file you attach. i see there is not 2 year.
Paul
If you are still looking in my way, Try to use
=If([No of Months_] >= 1 and [No of Months_] <= 24, Dual('0-2 Years', 1),
If([No of Months_] >= 24 and [No of Months_] <= 48, Dual('2-4 Years', 2),
If([No of Months_] >= 48 and [No of Months_] <= 72, Dual('4-6 Years', 3), Dual('More than 6 Years',4)
)))
If i think, In your way?
First do like
1) Promote field INVC SG tab
2) Ceil(Num(if(num(((date(today(),'DD/MM/YYYY') - date(@180:190,'DD/MM/YYYY'))/365*2))=0,1,num(((date(today(),'DD/MM/YYYY') - date(@180:190,'DD/MM/YYYY'))/365*2)))*24)) as [No of Months_]
And, Reload and show the image how [No of Months_] looks like?