BookmarkSubscribeRSS Feed
gabras
Pyrite | Level 9

Hello,

I'm trying to simulate a Customer Journey in SAS VA.

I would like something like this:

IDwayOfContactRequestDOITreqBefStorereqInStorewocBefStore
1TelA0---
1StoreB1ABTel
1TelC0---
1InD0---
1StoreB1DBIn
2FaxD0---
2MailC0---

 


The DOIT variable is calculated when the same ID contact the company by wayOfContact <> Store and then Store. DOIT is 1 if wayOfContact is Store, 0 otherwise. If an ID contact the company only going to Store wayOfContact must be 0.


And it is possible to hav also other column:
- object of the request before Store (reqBefStore)
- object of the request during Store (reqInStore)
- wayOfContact before Store (wocBefStore)

 

Please help me.

 

Thank you

10 REPLIES 10
SASKiwi
PROC Star

This is best done outside of VA using DATA step processing when preparing your VA load data. What have you tried so far?

gabras
Pyrite | Level 9
Hi @SASKiwi,

Thanks for the reply but i need to do it in VA. I need somethin dinamic that change based on what the user choose as filter. Maybe the user wants to see that table only when wayOfContact in (Tel, Store) and so DOIT must change accordingly.
I hope i was able to explain what i meant for.

Thank you 😉
SASKiwi
PROC Star

Can you show using your sample data how your calculated columns would change if the filter was applied?

gabras
Pyrite | Level 9

Hi,

 

if i wolud choose wayOfContact in (In , Store) the matrix would become:

 

IDwayOfContactRequestDOITreqBefStorereqInStorewocBefStore
1StoreB0---
1InD0---
1StoreB1DBIn

 

Any suggestion?

gabras
Pyrite | Level 9

I don't know if i'm wrong but i think that theese requirements could be reached using a Sankey Diagram.

But i have nevere used it.

gabras
Pyrite | Level 9

@FalkoSchulz would you help me?

 

I would add that i can add a date variable to my table.

But i have questions:

- if my data has no time values, and since it could be duplicated data value, is it possible to create a DOIT variable according to the sort the table showed?

- is it possible, using sankey diagram options,filter event (request) values and show the diagram based on given filter? Look at the table below:

Table i have:

IDwayOfContactRequestDOITreqBefStorereqInStorewocBefStore
1TelA0---
1StoreB1ABTel
1TelC0---
1InD0---
1StoreB1DBIn
2FaxD0---
2MailC0---
3FaxB0---
3InD0---
3StoreB1DBIn
4InE0---

 

Table after filtering (only "In" and "Store"):

 

IDwayOfContactRequestDOITreqBefStorereqInStorewocBefStore
1InD0---
1StoreB1DBIn
3InD0---
3StoreB1DBIn
4InE0---

 

 

Thank you

gabras
Pyrite | Level 9

@FalkoSchulz i have this dataset:

 

IDDatewayOfContactRequest
101/01/2018TelA
102/01/2018StoreB
103/01/2018TelC
104/01/2018InD
105/01/2018StoreB
205/01/2018FaxD
210/01/2018MailC
301/01/2018FaxB
302/01/2018InD
303/01/2018StoreB
402/01/2018InE
504/01/2018StoreA

 

and i would like something like this:

 

IDDatewayOfContactRequestDOITreqBefStorereqInStorewocBefStorenDaysPrevRow
101/01/2018TelA0--- 
102/01/2018StoreB1ABTel10
103/01/2018TelC0--- 
104/01/2018InD0--- 
105/01/2018StoreB1DBIn3
205/01/2018FaxD0--- 
210/01/2018MailC0--- 
301/01/2018FaxB0--- 
302/01/2018InD0--- 
303/01/2018StoreB1DBIn2
402/01/2018InE0--- 
504/01/2018StoreA0--- 

 

If wayOfContact in ('Store','In') filter is applied could become:

IDDatewayOfContactRequestDOITreqBefStorereqInStorewocBefStorenDaysPrevRow
102/01/2018StoreB0--- 
104/01/2018InD0--- 
105/01/2018StoreB1DBIn3
302/01/2018InD0--- 
303/01/2018StoreB1DBIn2
402/01/2018InE0--- 
504/01/2018StoreA0--- 

 

 

Is it possible to have this in sas va?

is it possible to have it using sankey diagram ?

SASKiwi
PROC Star

If you prefer a Sankey diagram then how you are trying to restructure your data isn't required, I suspect. What version of VA are you using? Up to Version 7.4 Sankey diagrams are only available as visualisations which you can export to a VA report:

 

http://support.sas.com/documentation/cdl/en/vaug/69957/HTML/default/viewer.htm#n08zz749uilz3cn1u3hm8...

 

I'll leave it up to those who know more about these diagrams to comment further

gabras
Pyrite | Level 9
Hi @SASKiwi
I think you are right.
But the re are some requirements that i don’t know i can do using sankey diagram. For example, is it possibile to add a label to the node? If i use the way of contact variabile for the node is it possibile to show also the request associated to it?
FalkoSchulz
SAS Employee

Unfortunately there are some limitations in terms how row-based calculations can be done in VA. You have a related discussion here: Re: SAS Visual Analytics create a Sequence variable

 

You can certainly use your original table straight as input to path analysis (sankey diagram) - it would render similar to this:

 

va82_sankey_sample.png

 

Note, that a sankey diagram is really designed to be used on high volume data so you rarely look at an individual but rather at the overall customer journey here. For example, what percentage of my customers first contact by phone and then visit a store? How many customers do not come back (contact) after visiting a store? How many purchase a product? etc.

 

The sankey diagram shows you the total count (small numbers to the start and the end of a path) taking this particular step.

 

No, the labeling in a sankey diagram is done given the event identifier. in your example this is probably 'wayOfContact'. You can however use special path filters here to identify a particular path(s) of interest. For more detailed investigation - you can create other visualizations given a path or event selection (e.g. bar chart showing the customers behind this path). Such visualization can have additional labels, measures etc to describe this path subset.

 

Hope this helps. Falko

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 10 replies
  • 1022 views
  • 0 likes
  • 3 in conversation