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:
And i want to create a sequence variable: i have to enumerate the records based on the ID column.
Now i have to create some report:
|N of contact||N multiple contact||avg day of recontact|
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
|Max Contact||N of ID||%||N of contact|
|6 to 10||93||0,50%||625|
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.
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
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.