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

Comparing one entity with the average of the population

Occasional Contributor
Posts: 13

Comparing one entity with the average of the population

Hi all,

My data source has several lines of data per entity, with a date, cost, product code, etc.

I have a question: How can I create a graph that has, for example, the cost per month per number of products of one of the entities, compared to the average of the whole population of entities for the same quantity. I want this on a graph with two lines (not to graphs next to each other). I do not need help on the calculated items and aggregated measures.

The problem I run into is that if i use a filter for the one entity (filtered by a free text field that let's me enter that entity's code), then the data source is filtered for that graph, so I can't calculate the average of the population anymore. In practice I have more graphs, on which I want to see a number of performance indicators that all describe the same entity. Therefore, I put the filtering free text field in that upper controls bar on the report.

Thanks for any tips and tricks!


Super User
Super User
Posts: 7,718

Re: Comparing one entity with the average of the population

Manipulate your data to reflect what you want in the output.  So create two datasets, one for one line, one for the mean.  Then overlay these in GTL.  Examples are at: http://blogs.sas.com/content/graphicallyspeaking/

Occasional Contributor
Posts: 13

Re: Comparing one entity with the average of the population

But that one line will be different every time the repotr is viewed, as this is used as a way to benchmark entities. With other words: that filter will be different every time. I can of course make a separate data set with only averages of the whole community, but given the number of indicators I have in total (only a subset of which will be present for every entity) this would be a very large table in memory that is mostly empty. If this isn't strictly necessary, I'd rather avoid it.

Posts: 40

Re: Comparing one entity with the average of the population

I have the same problem, and have not found a way around.

I don't think that Visual Analytics is intended for bench marking.

For now the best solution I could come up with is to display two separate graphs.

The left shows average of the hole population and the one to the right shows the department itself.

In the back there are two tables with the same data. But the table that I use on the right has row-level-security so that the user only get access til the departments own data.

SAS Employee
Posts: 19

Re: Comparing one entity with the average of the population

I would have suggested using two graphs but you have clearly stated this is something that you wanted to avoid.  I don't think that you would be able to change the filter (One Filter) and in the right panel and have it work as you envisioned.  I think that in your use case you would have to either utilize two visualizations and have a data source filter.   Two charts is your best route.  We are exploring expanding our calculations in Visual Analytics and I appreciate the input on use cases.  As we expand this is a great use case for us to keep track of going forward. 


Ted Werner

Ask a Question
Discussion stats
  • 4 replies
  • 1 like
  • 4 in conversation