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 open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.