BookmarkSubscribeRSS Feed
MarjoPul
Calcite | Level 5

Hi,

 

I have following website visitor data:

avgsessionduration (in seconds but in numeric format)

sessions

+ dimensions like 'campaign' and 'ad'

 

As the idea is to report avgerage sessions duration by 'campaign', I have created 'weighted average session duration' (as the avgsessionduration is already aggregated): 'sum of avgsessionduraton weighted values' / 'sum of sessions'

 

Now I have time weighted session duration in seconds, but it's a numeric value. How to convert this value to time format?

 

I know how to convert the original measure 'avgsessionduration' to time format by creating a new calculated item, but I can't figure out how to use the calculated item in the 'weighted average session duration' calculation. Nor I cannot convert calculation afterward to time format.

1 REPLY 1
PeterWijers
Lapis Lazuli | Level 10

Hi There,

maybe this might help.

Create another calculated item being a time variable and use the following function.

10-11-2017 20-52-31.png

Now just calculate the Hour/Minutes/Seconds form the previous calculated seconds variable.

 

greetings and good luck

 

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
  • 1 reply
  • 1187 views
  • 0 likes
  • 2 in conversation