BookmarkSubscribeRSS Feed
gabras
Pyrite | Level 9

Hi SAS Visual Analytics expert,

 

i'm quite new on SAS VA and i'm facing some problem using it.

I have to do something that could be quite simple to do with SAS BASE: for example i can't create a sequence variable base don some BY variable, and i can't use the lag function and i don't know how can i simulate them.

The problem here is that the table must change based on the filters the user can select.

For example, if i change the time period, the Sequence variable has to change its value based on the period selected.

 

I have this table:

InteractionIDData
1101/01/2018
2102/01/2018
3103/01/2018
4104/01/2018
5203/01/2018
6205/01/2018
7207/01/2018
8305/01/2018
9307/01/2018
10309/01/2018

 

And i want to create a sequence variable: i have to enumerate the records based on the ID column.

 

InteractionIDDataSequence
1101/01/20181
2102/01/20182
3103/01/20183
4104/01/20184
5203/01/20181
6205/01/20182
7207/01/20183
8305/01/20181
9307/01/20182
10309/01/20183

 

Now i have to create some report:

 

1 Report  
N of contactN multiple contactavg day of recontact
24.22719
31.42116
452713
522011
610211
07.121198
13-18175
Tot6.63317

 

Where:

N of contact: indicates the number of contacts(interactions) made by users. Essentially it counts the rows
N multiple contact: indicates the number of users who made multiple contacts, in relation to the N Contacts column. [527 users have contacted the company four times]
avg day of recontact: indicates the average time between one contact and the next

 

 

2 Report   
Max ContactN of ID%N of contact
112.18974,30%12.189
22.80617,10%5.612
38945,40%2.682
43071,90%1.228
51180,70%590
6 to 10930,50%625
>=1190,10%123
Totale16.416100%23.049

 

Max Contact indicates the maximum number of contacts made by users
N of ID: indicates the number of users who have made a n max contact. Ex: 894 users have contacted the company at most 3 times.
N of contact: indicates the number of contacts made by IDs who have contacted the Institute at most a n (Max Contact) number of times. Ex: The 894 IDs that contacted 3 times maximum, generated 2,682 interactions (894 * 3).

 

 

Maybe i should use a stored process in VA but i have never used it.

If it's a solution it is sufficient write the code in SAS Guide and then register it into sas va report?

What i was thinking, if there are no ways on doing what i want in SAS VA, is that the user can define the from-date and the to-date from VA. Then the procedure create the table and load them in memory so the report can be showed.

 

Thank you

 

 

 

2 REPLIES 2
gabras
Pyrite | Level 9

Hi @FalkoSchulz@TejaSurapaneni@PeterWijers@MichelleHomes

could you help me find a way to do this report.

I can also show other reports but the have to show the information a wrote above.

FalkoSchulz
SAS Employee

As mentioned in https://communities.sas.com/t5/SAS-Visual-Analytics/Visual-Analytics-First-var-Last-var/m-p/484219/h... - VA doesn't allow row based calculations such as sequence or lag (as these require special sorting to work). Did you try using path analysis to see whether this is suitable for your needs? Things like customer count on given paths and measuring overall customer journey / contact points is part of sankey diagrams.

 

Otherwise you could create a SAS job to create and update the table using data step. Yes, you can use SAS Enterprise Guide (or even SAS Studio if you are on SAS Viya already). Probably easier just to have the job replacing the in-memory table on regular basis so any report consumer gets updated values when viewing the report.

 

Hope this helps. Falko

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 895 views
  • 0 likes
  • 2 in conversation