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

Visual Analytics- First.var Last.var

Reply
Contributor
Posts: 62

Visual Analytics- First.var Last.var

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

Super User
Posts: 4,023

Re: Visual Analytics- First.var Last.var

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

Contributor
Posts: 62

Re: Visual Analytics- First.var Last.var

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 Smiley Wink
Super User
Posts: 4,023

Re: Visual Analytics- First.var Last.var

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

Contributor
Posts: 62

Re: Visual Analytics- First.var Last.var

Hi,

 

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

 

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

 

Any suggestion?

Contributor
Posts: 62

Re: Visual Analytics- First.var Last.var

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.

Contributor
Posts: 62

Re: Visual Analytics- First.var Last.var

[ Edited ]

@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

Contributor
Posts: 62

Re: Visual Analytics- First.var Last.var

[ Edited ]

@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 ?

Super User
Posts: 4,023

Re: Visual Analytics- First.var Last.var

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

Contributor
Posts: 62

Re: Visual Analytics- First.var Last.var

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?
SAS Super FREQ
Posts: 108

Re: Visual Analytics- First.var Last.var

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

Ask a Question
Discussion stats
  • 10 replies
  • 147 views
  • 0 likes
  • 3 in conversation