BookmarkSubscribeRSS Feed
gabras
Pyrite | Level 9

Hi everybody,

 

i'm facing some problem understanding the usage of the weigth in sankey diagram on VA.

I have this kind of data 

Trans_IDItemOrderElapsed
1A1120
1B2120
1C3180
1D430
2A1120
2B230
3A160
3A260
4B1120
4A260
4C330

 

I would like that the width of the path would represent the average of elapsed (used as weigth).

Is it possible? if yes, where i can change the aggregation measure for the weight.

 

Thank you

 

@FalkoSchulz  can you help me?

5 REPLIES 5
FalkoSchulz
SAS Employee

Hi!

 

Note, that aggregation is done on path level and not on segment (or event) level. Taking your example - it renders as follow in VA 8.x:

va83_sankey_sample_01.png

Let's just look at one path for illustration purposes (A->B) as marked in above screenshot. Taking all events for this path the aggregated path weight is 150.

 

Let's add another transaction (#5) for the same path and it renders as:

va83_sankey_sample_02.png

 

The total weight of the same path is now 300 given the two contributing transactions (#2 and #5). If you want to see the average across all paths instead (so 150 in the example above) - you would change the aggregation of the weight variable in the data panel:

va83_sankey_sample_03.png

 

Hope this helps. Regards, Falko

gabras
Pyrite | Level 9

Hi @FalkoSchulz 

if i understand correctly i have to change the aggregation method in the data properties in the lower left of the screen.

So it is not referring to diagram properties.

If it is, i can also set Median for the aggregation methods.

Is it correct?

 

Thank you

FalkoSchulz
SAS Employee

Hi,

 

Yes, that is correct - the applied aggregation is on data item level so something you adjust in the data panel. As per documentation - supported aggregations for the weight role include sum, average, minimum, or maximum.

 

Hope this helps. Regards, Falko

gabras
Pyrite | Level 9

Hi @FalkoSchulz ,

thank you for you answer.

 

I would ask you something about the diagram representation differences based on the weight aggregation you use.

the data are the same as i reported above.

If i use frequency as measure to determine the width of the path i have several path above 2 event (since i specified minimum path length = 2).

let's say i choose SUM as weight aggregation and i still have several path with more than 2 events.

PathAnalysis_SUM.PNG

If i choose AVARAGE the diagram shows me only paths with just 2 events.

PathAnalysis_AVARAGE.PNG

I'm wondering why it could happen.

 

Thank you

FalkoSchulz
SAS Employee

Sorry for the delay in responding. As far as I remember the graph shouldn't change (in terms of number of paths displayed) if you change the aggregation. Are you able to share your data so I can see more details (the screens you shared indicate you have used a different data set than the one used in the first example). Or alternatively - can you try using the original data and see whether you see similar results?

 

Thanks, Falko

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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