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

Record the selected Hierarchy level in a button bar

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Record the selected Hierarchy level in a button bar

Hi All,

 

I am trying to display the selected hierarchy level as a title in a button bar using the interaction, but too many values are being displayed unless we are at the bottom of the hierarchy.

 

The value I have assigned to the button bar is concatenation of sa - fac - ac - gl

 

As you can observe on the 1st image (capture 1), I have assigned the hierachy to the category of a bar chart. The first level of hierarchy is SA. So if I click on any one of the bar and select the section which have button bar, it should only display SA value and other should be missing. Similary if I drill further down to FAC level (3rd image -capture 3). Then on selecting the section, it should only display selected SA-FAC Value and so on.

 

Currenlty, it resulting in all the combination of the next data item that I have used in concatenation.

 

For example, on Hierarchy Level : SA->FAC, I clicked on sa2, then fac1. It is returning all the commbination of sa-fac with gl and ac.

 

Is there any way I can show them as missing if there are multiple values ? or Is there any other way to show selected hierarcy level?

 

I can create separate calc itens for sa - fac, sa - fac - ac and sa - fac - ac - gl combinations, but I am not able to create a formula using calculated items that will return this dynamically.

 

PS- Button bar doesn't support aggregated measure. 

 

You can use the following code to create the table:

 

data test;
input sa $ fac $ ac $ gl $;
datalines;
sa1 fac1 ac1 gl1
sa2 fac1 ac1 gl1
sa3 fac1 ac1 gl1
sa4 fac1 ac1 gl1
sa1 fac1 ac2 gl1
sa1 fac1 ac1 gl2
sa2 fac1 ac1 gl2
sa3 fac1 ac1 gl2
sa4 fac1 ac1 gl2
sa1 fac1 ac2 gl1
sa2 fac1 ac2 gl1
sa3 fac1 ac2 gl1
sa4 fac1 ac2 gl1
sa1 fac1 ac2 gl2
sa2 fac1 ac2 gl2
sa3 fac1 ac2 gl2
sa4 fac1 ac2 gl2
sa1 fac2 ac3 gl3
sa2 fac2 ac3 gl3
sa3 fac2 ac3 gl3
sa4 fac2 ac3 gl3
sa1 fac2 ac3 gl4
sa2 fac2 ac3 gl4
sa3 fac2 ac3 gl4
sa4 fac2 ac3 gl4
sa1 fac2 ac4 gl3
sa2 fac2 ac4 gl3
sa3 fac2 ac4 gl3
sa4 fac2 ac4 gl3
sa1 fac2 ac4 gl4
sa2 fac2 ac4 gl4
sa3 fac2 ac4 gl4
sa4 fac2 ac4 gl4
;
run;

 

Please let me know if you need more information on it.

 

I am using VA 7.1

 

Thanks

Capture1.JPGCapture2.JPGCapture3.JPGCapture4.JPG


Accepted Solutions
Solution
‎10-04-2017 03:24 AM
Regular Contributor
Posts: 194

Re: Record the selected Hierarchy level in a button bar

Ok, i think i get it.

In newer versions of VA you will have dynamic text that might be better than the button bar.

But in 7.1 you could use the pie chart (which allows aggregated/grouped values) and remove the actual pie and only show the text.

Maybe if you use one pie for each level och your hierarchy you would get what you want?

 

Lets say in the first report you show one pie with sa1-sa4. In the next report wou show the same pie and another with the next level FAC1-FAC4, and so on. You create interactions to each of the objects and filter them due to the selections made?

 

//Fredrik

View solution in original post


All Replies
Regular Contributor
Posts: 194

Re: Record the selected Hierarchy level in a button bar

I don't really get it Smiley Happy

Why do you want to use bar charts/button bars, is it not possible to use a cross table?

What is it that you want to show and why?

//Fredrik

New Contributor
Posts: 3

Re: Record the selected Hierarchy level in a button bar

Actually, the purpose is to show the selected filters in the report. User clicks on a bar at some hierarchy level, then it takes the user to a Info Window via interaction, where further distribution of data is displayed (e.g trend lines, bubble chart). There I want to display the already applied filters. I am using the button bar to display the hierachy level selected as title. I want to show that on which level of hierachy the current report is being displayed on the Info Window.

 

I know crosstab will show the result but I don't want that much detailed data. It will take too much space on canvas. For example, If I selected the bar at SA level then, it should only return the SA Value. Crosstab will display SA and the further distribution of FAC, AU, GL. And it will be altogether another exhibit. 

 

Hope I make some sense.

 

Solution
‎10-04-2017 03:24 AM
Regular Contributor
Posts: 194

Re: Record the selected Hierarchy level in a button bar

Ok, i think i get it.

In newer versions of VA you will have dynamic text that might be better than the button bar.

But in 7.1 you could use the pie chart (which allows aggregated/grouped values) and remove the actual pie and only show the text.

Maybe if you use one pie for each level och your hierarchy you would get what you want?

 

Lets say in the first report you show one pie with sa1-sa4. In the next report wou show the same pie and another with the next level FAC1-FAC4, and so on. You create interactions to each of the objects and filter them due to the selections made?

 

//Fredrik

New Contributor
Posts: 3

Re: Record the selected Hierarchy level in a button bar

 

Thanks for the help Fredik. I am somewhat able to create  what I needed, I have used different Pie Charts as label to display different hierarchy level, then put the Rank over them to show only one value and display the rest as All Other.

 

Thanks.

Regular Contributor
Posts: 194

Re: Record the selected Hierarchy level in a button bar

Sweet!

I usually create a new Category with only one value and add it as group to the pie chart.

As text I only show label and actual values.

I also set all color to the same as the background, so that the pie is hidden.

This is how it looks for me:

pia.png

//Fredrik

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 165 views
  • 1 like
  • 2 in conversation