BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
megha_singh89
Calcite | Level 5

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
RR2809
Fluorite | Level 6

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

8 REPLIES 8
Mike_Drutar
SAS Employee

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.

RR2809
Fluorite | Level 6

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.

saspert
Pyrite | Level 9

@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.

RR2809
Fluorite | Level 6

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.

 

megha_singh89
Calcite | Level 5

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.

RR2809
Fluorite | Level 6

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.

 

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

Best,

Sean
semone
Fluorite | Level 6
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/

SAS Innovate 2025: Register Now

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!

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
  • 8 replies
  • 2777 views
  • 2 likes
  • 5 in conversation