Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
I have the listed requirement. I want the part highlighted in BOLD in my chart. Can i use interval match if so how do I do it?
Thanks
Hi,
try this...
Sorry, did I miss the qvw???
Thanks
Rate:
Mapping Load * Inline [
Yrs, Rate
0 to 1, 0.9
1 to 3, 2.25
3 to 5, 4.05
];
Temp:
Load * Inline [
Term, Yrs
0-370, 0 to 1
371-1105, 1 to 3
1106-1831, 3 to 5
];
Table:
Load * Inline [
Name, Amount, Termdays
ABC, 100, 170
DEF, 200 , 1200
];
INNER Join(Table)
IntervalMatch (Termdays)
Load
SubField(Term,'-',1) as From,
SubField(Term,'-',2) as To
Resident
Temp;
Temp2:
Load
Name,Amount,Termdays,From&'-'&To as Term
Resident
Table;
Drop Table
Table;
Left Join(Temp2)
Load
Term,
Yrs
Resident
Temp;
Drop Table
Temp;
FinalTable:
Load
Name,Amount,Termdays,Amount*Rate as Fee;
Load
Name,Amount,Termdays,Term,Yrs,
ApplyMap('Rate',Yrs) as Rate
Resident
Temp2;
Drop Table
Temp2;
QVW
Best regards,
German