I am trying to set a filter using dates:
if build_mn < sold_mn - 3 then do ;
...
...
end ;
It is grabbing all the records and not filtering. I think I am using the sold_mn - 3 wrong.
Can someone help me with this?
@amyk wrote:
I am trying to set a filter using dates:
if build_mn < sold_mn - 3 then do ;
......
end ;
It is grabbing all the records and not filtering. I think I am using the sold_mn - 3 wrong.
Can someone help me with this?
What are you trying to do? You've shown non working code, but not explained what you think it's doing or what you want it to do.
I want to set a flag if the build month is 4 months less then the sold month then set flags.
Thanks that helped.
I ended up using it as follows:
build_mn le intnx('month', build_mn, -4, 'e')
It gave me exactly what I was looking for. Again thank you so much!! 🙂
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.