Hi! I am trying to build a function that returns the prior weekday and considers holidays. I have done this in the advanced filter builder by using a case statement that says if the prior weekday is a holiday, return two weekdays prior, otherwise return the prior weekday. My coding does not error, but my project spins until ultimately freezing up. Can you please tell me if this option is not a viable solution and/or what is? I'm hoping to do this using advanced filter builder rather than writing a program or proc statement as I am fairly new to coding in SAS EG. CASE WHEN INTNX('weekday', today(),-1) = holiday('newyear',year(today())) THEN t1.PriceDate = INTNX('weekday', today(),-2) WHEN INTNX('weekday', today(),-1) = holiday('mlk',year(today())) THEN t1.PriceDate = INTNX('weekday', today(),-2) WHEN INTNX('weekday', today(),-1) = holiday('uspresidents',year(today())) THEN t1.PriceDate = INTNX('weekday', today(),-2) WHEN INTNX('weekday', today(),-1) = holiday('memorial',year(today())) THEN t1.PriceDate = INTNX('weekday', today(),-2) WHEN INTNX('weekday', today(),-1) = holiday('usindependence',year(today())) THEN t1.PriceDate = INTNX('weekday', today(),-2) WHEN INTNX('weekday', today(),-1) = holiday('labor',year(today())) THEN t1.PriceDate = INTNX('weekday', today(),-2) WHEN INTNX('weekday', today(),-1) = holiday('thanksgiving',year(today())) THEN t1.PriceDate = INTNX('weekday', today(),-2) WHEN INTNX('weekday', today(),-1) = holiday('christmas',year(today())) THEN t1.PriceDate = INTNX('weekday', today(),-2) ELSE t1.PriceDate = INTNX('weekday', today(),-1) END Thanks!
... View more