Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If there is a field name (period_num) having months 1 to 13 & there is another field(ftm). According to the requirement I want to consider till (period_num)=12, such that ftm of period_num=13 is added in ftm of period_num =12
Maybe sthing like this :
//Suppose this is your current table
ftm:
load * inline [
num,ftm
1,10
2,20
3,30
4,40
5,50
6,60
7,70
8,80
9,90
10,100
11,110
12,120
13,130
];
//what you should do
newFtm:
NoConcatenate
load num,sum(ftm) as FTM group by num ;
load num, ftm Resident ftm where num<>12 and num<>13;
Concatenate
load num, sum(ftm) as FTM group by num;
load '12' as num, (ftm) Resident ftm where num=12 or num=13;
drop table ftm;
result:
Ty omar.
That did the trick?
yes
Good.
Then please, don't forget to close the thred by marking the correct answer as correct.