Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We are using the interval match to flag months to a Sum(Amount) value.But it creates duplicates causing high sum(Amount).Below were the reload count and also the code.
Scipt using:
LET _mindate = makedate(year(today()),5);
LET _maxdate = makedate(year(today())+5,5);
LOAD
yearname(Month,0,5) as Year,
Month;
Temp1:
LOAD
MonthName('$(_mindate)',iterno()-1) as Month
autogenerate 1
While MonthName('$(_mindate)',iterno()-1) < '$(_maxdate)';
Temp:
LOAD
if(len(trim(ContractItem_EndDate)) = 0, date(AddYears(today(),1)), date(ContractItem_EndDate)) as [End date],
date(ContractItem_StartDate) as [Start date],
ContractItem_Price as Amount
FROM ********************************;
ExpTemp:
Load
%LeaseKey,
Description,
Period,
Amount,
[Start date],
[End date],
Currency
Resident Temp;
drop table Temp;
Left join
IntervalMatch(Month)
LOAD Distinct
[Start date],
[End date]
Resident
ExpTemp;
Hi Any suggestion Please.