Hi, i'm not sure to be in the good location. I prepare data with sas data studio. I want to sort my data with a date. I know that i can use a function in studio with case and INTCK but i would like to do this on SAS data studio by using a calculated collumns. But i dont' find the function case and if i use IF, i have an error. Can you help me?
Show us the log for your code (all of it, not just the errors)
Show us a portion of your data.
CASE as a statement pretty much only exists in Proc SQL and is not a function. So I am pretty confused as to what sort of code you even attempting.
The calculated column transformation accept data step syntax, but does not allow conditional values. Help within the product:
"Creating Calculated Columns
For more information about creating calculated columns, see Creating Calculated Columns in SAS Data Studio: User’s Guide."
That being said, INTCK should work.
If wish to do conditional processing, use IFC/IFN functions rather than the corresponding statements.
Perhaps this is an actual use case for the IFN() or IFC() functions that SAS added a few years ago?
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.