You can use below codevar fromDate = Date1var toDate = Date2if ( HasValue(fromDate) &HasValue(toDate) ) then var fromDateAsNum =Date2Num(fromDate, "YYYY-MM-DD","en_IE") var toDateAsNum =Date2Num(toDate, "YYYY-MM-DD", "en_IE") if (toDateAsNum >=fromDateAsNum) thenvar TotalD...