Good day! There is a problem using the intervalmatch function. In short: Having executed the script below, despite the fact that the correct values are displayed in the Data manager, when you try to use the sum () function in the visualization, all values increase exactly 4 times. Please tell me what is wrong with the script?
MinMaxDate: Load Min(mindate) as MinDate, Max(maxdate) as MaxDate resident Tr; Let vMinDate = Peek('MinDate',-1,'MinMaxDate'); Let vMaxDate = Peek('MaxDate',-1,'MinMaxDate')+1; Drop Table MinMaxDate;
MasterCalendar: Load Date($(vMinDate) + RecNo() -1) AS Date Autogenerate vMaxDate-vMinDate; inner join (Tr) intervalmatch (Date) LOAD mindate,maxdate resident Tr; drop table MasterCalendar; NoConcatenate result: Load org&Date as Key,* resident Tr; drop table Tr; left join dat: load org1&Date1 as Key,val1; load * inline [org1,Date1,val1 'rome','1/20/2019',200 'rome','1/30/2019',200 'igi','1/10/2019',300 'igi','1/15/2019',300];