Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Realmoca
Contributor II
Contributor II

Using Interval Match with less than date

Hello ,

I have been trying the past few hours to implement an Interval Match where the last date field that I'm looking for is before the departure date field.

This is the Script for the Interval Match with the fields that I'm using:

Date_90_dayss:
LOAD
date as date90
RESIDENT History_OnTheBooks;

IntervalMatch:
IntervalMatch (date90)
Load distinct [arrival], [departure] resident ArrivalDepartureStays;

 

This is how the table looks like:

intervalinterval

In this table example, the idea is that when I choose that Date (09/21/2020) which is the date90 field, all the values to be shown must be before the departure date.

This is the set analyisis that I'm using for the values Rate, Room night and Total Revenue:

Rate:  Sum ({$<type_sya={"adsyad"}>} total_revenue) / Sum({$<type_sya={"adsyad"}>} room_night)

 Room night: Sum({<type_sya={'adsyad'} >} room_night)

Total Revenue: sum({<type_sya={'adsyad'} >} total_revenue)

 

Please help! I don't understand what's going wrong or what I'm missing in the script or the set analysis.

Thanks!

Labels (1)
0 Replies