Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Parameters

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

Parameters

Can anybody Please explain how do I create a Quarterly and Monthly view of the same data.

I want to create a parameter where the end user gives the input whether he wants to view the data Quarterly or Monthly

and the view changes according to that.

 


Accepted Solutions
Solution
‎10-02-2015 05:16 AM
Occasional Contributor
Posts: 6

Re: Parameters

Hi,

I will try to show concept with screens:

 

1. Add Supporting Table, then create button-bar and declare connected parameter ("Par_PERIOD", text type)

Parameter_1.jpg

 

2. In Fact Table (witch contains data to be analysed) create new calculated category ['Date' is calendar date]:

Parameter_2.jpg

 

3. Result: one report with several views (measures and categories from Fact Table Source):

Parameter_3.jpg

 

Parameter_4.jpg

 

Parameter_5.jpg

 

Best Regards

Robert R.

 

View solution in original post


All Replies
SAS Employee
Posts: 17

Re: Parameters

You could potentially levearge the Stack Container to allow the report viewer to choose between which visualziation they want to see (Quarterly or Monthly).  Robert Anderson has a great write up on stacked containers in his post: Using Containers in SAS Visual Analytics.

Occasional Contributor
Posts: 6

Re: Parameters

Hi I did it in my report, it’s not so complicated ;-)

 

  1. Create in repository additional table e.g. "Param" - with field "Period" and records: 'Monthly', 'Quarterly'. I did this as Excel file and added to SAS VA.
  2. Add this custom table as new source to your report builder (so now you will have as sources 2 tables - main with analysed data (e.g. "Sales" and second "Pamar").
  3. Create in your report button-bar, assign to bar "Period" category from "Param" table and create new parameter (text type) with this button-bar (called e.g. "View Type"). So - when you will choose "Monthly" on button-bar the parameter "View Type" will get "Monthly" value, and so on for choosing "Quarterly"
  4. Create (if you have not yet) in "Sales" data set new categories: "Mth", "Qtr" e.g.: Mth=Month ('Date'n); Qtr=Quarter ('Date'n) 
  5. Create custom category "Period_An." in "Sales" data set like this: if 'View Type 'p = "Monthly" return 'Mth'n else 'Qtr'n
  6. Use category "Period_An." in your report as category for analysis (in tables or charts). Now after choosing desired value on button-bar you will get monthly or quarterly view of analysed data.

 

Same technic I'm using for reviewing data in daily, weekly, monthly or yearly perspective, as well as for viewing results for period or cumulated in the same report.

Hope it's clear, forgive me poor English.

 

Robert R.

Super Contributor
Posts: 268

Re: Parameters

@RR2809 this is a great tip. I think I am slowly understanding the concept. I think you have a drop down list wherein you can select from- 

Monthly (781)

Quarterly (45)

 

My numbers are dummy but the actual table will probably show the record count. Now can I implement a similar thing for multiple selecction? Say the users can select more than 1 categorical field from -

Country (2)

Market (12)
Product (5)

Region (21)

 

Please feel free to send me a private message if necessary

 

Thanks,

saspert.

Solution
‎10-02-2015 05:16 AM
Occasional Contributor
Posts: 6

Re: Parameters

Hi,

I will try to show concept with screens:

 

1. Add Supporting Table, then create button-bar and declare connected parameter ("Par_PERIOD", text type)

Parameter_1.jpg

 

2. In Fact Table (witch contains data to be analysed) create new calculated category ['Date' is calendar date]:

Parameter_2.jpg

 

3. Result: one report with several views (measures and categories from Fact Table Source):

Parameter_3.jpg

 

Parameter_4.jpg

 

Parameter_5.jpg

 

Best Regards

Robert R.

 

Occasional Contributor
Posts: 9

Re: Parameters

Thanks a lot. It was really helpful.

 

Another thing I would like to ask is :

 

If we have to create a text parameter, everytime we'll be making excel tables like the one you mentioned in your post?

 

Megha.

Occasional Contributor
Posts: 6

Re: Parameters

Hi,

No, you need excel file only once - just to prepare supporting data source in repository.

Of course you can prepare this table in Guide or other way .... Whatever.

 

In report, then:

Create button-bar, assign cattegory, right click mouse - choose "Create parameter"

 

Robert R.

 

Occasional Contributor
Posts: 7

Re: Parameters

Hi Saspert, I have the same need as well (multiple parameter selection). Were you able to come up with a workable solution?

Best,

Sean
Occasional Contributor
Posts: 7

Re: Parameters

No sooner had I posted then I found this which enables the functionality I need in 7.2:
http://blogs.sas.com/content/sgf/2015/09/16/accessing-va-reports-with-parameterized-urls/
Post a Question
Discussion Stats
  • 8 replies
  • 959 views
  • 2 likes
  • 5 in conversation