BookmarkSubscribeRSS Feed
khanjab
Calcite | Level 5

Hi There,

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.

 

Many thanks!

Shahjad

3 REPLIES 3
TobiasH
Fluorite | Level 6

Hi,

 

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.

 

Tobias

khanjab
Calcite | Level 5

Hi Tobias,

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.

 

Thanks

Shahjad

 

TobiasH
Fluorite | Level 6

Hi Shanhjad,

 

I've been using the Button bars, too. See these two blog entries how to use button bars to influence your measures:

 

http://blogs.sas.com/content/sgf/2016/04/27/use-parameters-to-pick-your-metric-in-visual-analytics-r...

http://blogs.sas.com/content/sgf/2015/01/29/using-parameters-in-sas-visual-analytics/

 

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.

 

Best,

Tobias

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

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.

Discussion stats
  • 3 replies
  • 1643 views
  • 0 likes
  • 2 in conversation