I am trying to calculate YTD using DayNumberOfYear(). My calendar is FY, first month is Oct. In MasterCalendar I have added DayNumberOfYear(DateofSale,10) as DayNbrOfYear now in the set analysis I am trying to check a range if day falls between day 1 and the day number as of Today(). Problem is it is not giving me syntax error and not calculating it properly. For e.g as of today it should add up only day 1-142 it is adding up entire Year.