5 Replies Latest reply on May 2, 2018 5:44 PM by Jennifer VonHagel

    Monthly total of all non-business days

    Roberto Romita

      Hi everybody,

      I've been struggling for the last few days in trying to calculate all NON-business days in the current month.


      Please note that the data source, other than including one row for each day of the month, also includes a weekend_YN field = ‘Y’ for weekends and holiday_YN = ‘Y’ for US holidays.


      So after filtering the current month, I created a simple calculated field called Non_business_days that SHOULD return 1 if the day is either a weekend or an holiday, 0 otherwise, expecting the sum to be 9… instead of 30,346,912!!!


      The calculated field for non_Business_days is:


      if [Weekend Yn] = 'Y' or [Holiday Yn]='Y' then 1 else 0 END


      Any help would be greatly appreciated!