Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Krish2459_58
Creator
Creator

Intermatch creates duplicates

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.

Krish2459_58_0-1688957694291.png

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;

 

Labels (1)
1 Reply
Krish2459_58
Creator
Creator
Author

Hi Any suggestion Please.