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

SAS visual analytics how to reuse an aggregated measure

Reply
Contributor
Posts: 62

SAS visual analytics how to reuse an aggregated measure

Hi is it possibile to reuse a calcolare data item in further visualization?
I have
CustId. ID
1. 1
1. 2
2. 3
3. 4

And i want

CustId Count
1. 2
2. 1
3. 1

And i watt to reuse Count in order to count how many Cust have tua distinct value of count. So:

Count CountDistCustid
1. 2
2. 1

How can i do it using VA 7.3?
I thougth also about creating a sequence variable but it seems not possible in VA.

Thank you
Super User
Posts: 4,013

Re: SAS visual analytics how to reuse an aggregated measure

This can be easily done in SQL outside of VA as two separate tables, then loaded into VA.

 

What type of reports do you want to do? Some reports will do counts without the need to prepare your data.

Contributor
Posts: 62

Re: SAS visual analytics how to reuse an aggregated measure

Hi @SASKiwi,

You are rigth, it is Simone outside VA. But if you build it outsider va,the report in the VA will be static. You even can’t change the the period of time otherwise there is a risk that the column calculated out of the VA is completely wrong
Contributor
Posts: 62

Re: SAS visual analytics how to reuse an aggregated measure

@SASKiwi i would like to have a report that counts how many CustId had that amount of Interaction with the company. But i would like to see the same thing in a different period of time.
Super User
Posts: 4,013

Re: SAS visual analytics how to reuse an aggregated measure

@gabras - If you want a solution that has a time dimension you need to add that to the data you posted so I know what your complete requirements are. As long as you summarise to the lowest level of granularity in your time dimension then that will work fine in VA. I have done this myself.

Contributor
Posts: 62

Re: SAS visual analytics how to reuse an aggregated measure

Hi @SASKiwi

 

let's say i have 

IDCUSTIDDATE
1101/01/2018
2101/02/2018
3102/02/2018
4202/01/2018
5203/01/2018
6304/02/2018
7305/02/2018

 

and i want  to count how may interaction per custid

 

CUSTIDCount
13
22
32

 

 

and then how may distinct CF have that amount of count

 

CountCountDistCustId
22
31

 

 

Now, i want to filter the data from february 2018 and so the different tables should become:

 

IDCUSTIDDATE
1101/02/2018
2102/02/2018
3304/02/2018
4305/02/2018

 

CUSTIDCount
12
32

 

 

CountCountDistCustId
22

 

 

 

i hope it is clear

 

 

Thank you

Super User
Posts: 4,013

Re: SAS visual analytics how to reuse an aggregated measure

If I understand your customer count correctly, something like this should work. When you then apply a filter on date VA will only include the customer counts that obey the filter.

 

proc sql;
  create table want as 
  select date
        ,custid
        ,count(*) as Count
  from have
  group by date
          ,custid
  ;
quit;
Ask a Question
Discussion stats
  • 6 replies
  • 101 views
  • 0 likes
  • 2 in conversation