04-27-2017 08:20 AM
I'm creating a dashboard in which I'm putting a filter to select a date range. The full data is for one year and I'm placing a slider there which gives the flexibility to visualise the data for any quarter(s) range.
Now the problem is, available SAS date Format for quarters gives result as "1st Quarter 2016" which looks heavier as compared to
"Q1-2016" and requester pefers the second one.
I tried my way to convert Quarter of dates(1-4) in desired format (Q1-2016) by using character formatting and concatenation but the Slider does not accept a categorical variable.
Can anyone pls help me to make a slider which looks some like this: "Q1-2016 ____^________________________^_____Q4-2016"
or suggest anything better to achive what I am trying to.
04-27-2017 09:25 AM
as far as I know the Slider only takes numeric or date/datetime formated variables.
I would try two solutions:
1) Try using the SAS quarter format "1st Quarter 2016" instead of your formatted/calculated variable. If this works I would say: Form follows function.
2) Use a slider with a parameter 1 to 4 and (if you need it) a field or a slider for choosing the year (with a second parameter). Now you can define a calculated measure using the input data of the parameters.
04-27-2017 10:34 AM
Thanks for the solutions.
Your first solution is something I started with but that looks very unattractive as the slider contains four long strings (1st Quarter 2016) around it.
Is it possible to put a button bar on top of the report with 4 buttons(3 Months, 6 Months, 9 Months, YTD), clicking on one gives you the data of last X months (where X is the value from Button)? This could be an alternate way to get what I want to achive here.
04-28-2017 06:11 AM
I've been using the Button bars, too. See these two blog entries how to use button bars to influence your measures:
You can either use one calculated date with a case (multiple if...else...) or define multiple calculated items and choose by the parameter the item to show.