Hello,
In this picture above I have created a variable that shows the values from 1 - 7 reflecting the days of the week. However, i would now like for the 1-7 values to be reflected as day values (Monday, Tuesday, Wednesday). As I intend to use it in a slider, the slider only accepts values that are measure in nature. Can someone give me pointers on how to solve this issue?
Regards
Dan
Hi!
I think the easiest could be to create a custom category for the weekdays and use a list or button bar for the selection.
As you say, the slider won't work.
//Fredrik
You can display (and convert to a new variable, if needed) SAS date values as the weekday directly by using the DOWNAME. format, no need to extract the numeric weekday first:
data _null_;
format date downame.;
do date = today() - 6 to today();
put date=;
end;
run;
Log:
73 data _null_; 74 format date downame.; 75 do date = today() - 6 to today(); 76 put date=; 77 end; 78 run; date=Thursday date=Friday date=Saturday date=Sunday date=Monday date=Tuesday date=Wednesday
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!
See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.
Find more tutorials on the SAS Users YouTube channel.