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

Hi,

I have a vertical bar chart and on the horizontal axis there are months (1-12).

What I would like to do is create a functionality for users that if they double click on the bar for month 9 for instance that it leads them to a table in a different report section with details of month 9 in it.

 

Billybob73_0-1644842977113.png

I know things can be done with parameters, but I can't see how I can use one in this case.

Thanks for help or suggestions

 

Rgds

BB

1 ACCEPTED SOLUTION

Accepted Solutions
snoopy369
Barite | Level 11

This is done using linking.

 

First, you create a second page, which includes *all* of your detail data.  Here, I use a separate dataset that has the detail data; you could do this entire report with just one dataset if you had a computed total, but this is slightly easier - I like to do summaries outside of VA.

 

data htemp.bike_usage;
input month miles;
datalines;
1 100
2 200
3 300
4 400
5 500
6 600
7 500
8 500
9 800
10 1200
11 1100
12 1200
;;;;
run;

data htemp.month_detail;
input month means_of_transport $ miles;
datalines;
9 Bicycle 200
9 Bus 200
9 Car 200
9 Van 200
10 Bicycle 300
10 Bus 400
10 Car 200
10 Van 300
;;;;
run;

Then load these to CAS if you haven't already, and then I make a report, using the month summary dataset for the chart you made (the bar chart), titled "Overview", and then a second tab, "Detail", which is a list table.  You can of course do something other than list table, but the important thing is that it needs to have "month" as a field somewhere - it can be a "hidden" field, but it has to be associated with the chart somehow.

 

miles_detail_tab.png

 

Then, go to the Overview report and select Actions, then the bar chart, and open Page Links.  There should be a selection for Detail, and a note that you need to map the data (since it's from a different dataset).  

 

miles_actions_mustmap.png

 

Click on Map, and if the month variable is the same name in both datasets it'll auto-select as the mapping criteria - if not, pick the right mapping variable (think the variable which tells SAS which row should be mapped to which row from the left and right datasets).  

 

Once you've mapped the variable, then bars should become clickable, and you'll get the drilldown you wanted!  It will filter the Detail tab with the Month value from the bar.  Note the breadcrumb at the top which lets you go back easily, and the filter button showing what was filtered by.

 

miles_filtered.png

View solution in original post

1 REPLY 1
snoopy369
Barite | Level 11

This is done using linking.

 

First, you create a second page, which includes *all* of your detail data.  Here, I use a separate dataset that has the detail data; you could do this entire report with just one dataset if you had a computed total, but this is slightly easier - I like to do summaries outside of VA.

 

data htemp.bike_usage;
input month miles;
datalines;
1 100
2 200
3 300
4 400
5 500
6 600
7 500
8 500
9 800
10 1200
11 1100
12 1200
;;;;
run;

data htemp.month_detail;
input month means_of_transport $ miles;
datalines;
9 Bicycle 200
9 Bus 200
9 Car 200
9 Van 200
10 Bicycle 300
10 Bus 400
10 Car 200
10 Van 300
;;;;
run;

Then load these to CAS if you haven't already, and then I make a report, using the month summary dataset for the chart you made (the bar chart), titled "Overview", and then a second tab, "Detail", which is a list table.  You can of course do something other than list table, but the important thing is that it needs to have "month" as a field somewhere - it can be a "hidden" field, but it has to be associated with the chart somehow.

 

miles_detail_tab.png

 

Then, go to the Overview report and select Actions, then the bar chart, and open Page Links.  There should be a selection for Detail, and a note that you need to map the data (since it's from a different dataset).  

 

miles_actions_mustmap.png

 

Click on Map, and if the month variable is the same name in both datasets it'll auto-select as the mapping criteria - if not, pick the right mapping variable (think the variable which tells SAS which row should be mapped to which row from the left and right datasets).  

 

Once you've mapped the variable, then bars should become clickable, and you'll get the drilldown you wanted!  It will filter the Detail tab with the Month value from the bar.  Note the breadcrumb at the top which lets you go back easily, and the filter button showing what was filtered by.

 

miles_filtered.png

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 1 reply
  • 961 views
  • 0 likes
  • 2 in conversation