During load script I made two fields named StartTime and EndTime. In Calculation I used Set Analysis for finding sum between selected values.
Filter selection can be made only by fields. If you don't want to use variables you need to lad them by script. Workaraound with development of formulas with If() statemend to avoid calculating with wrong input values. It can be made like:
if(min(StartTime) > max(EndTime), 'Cahnge input option for dates. Start date Can't be grater than End Date')