cancel
Showing results for 
Search instead for 
Did you mean: 

Activity with in window of time

RADSr
Captain
Captain

If I have a site and I want to bucket visitors in to 'Super Active,' 'Active,' 'Kinda Active,' and 'Meh' based on a rolling n-day window of activity ( e.g. 30 visits is 'Super' 2 is 'Meh' )

That seems pretty straightforward for a given end date ( although I haven't done it yet ) but what if I want to do a timeline? On Jan 1 we had n-<level>, Jan 2 n-<level>, etc. so for each date I am looking back at the window and counting visitors?

Can I do that dynamically or do I need to loop through every date and put the results into a new table? If I do need to do that can I do it automatically and have it persist into the future?

-- IncortaOne@PMsquare.com --
1 REPLY 1

Rasha
Employee
Employee

Hello RADSr,

Please check and confirm the below as per my understanding:

1-Assuming this is the main data set:

Date No.Of vistors
1-Jan 2
2-Jan 3
3-Jan 5
4-Jan 10
5-Jan 12
6-Jan 6
7-Jan 4
8-Jan 7
9-Jan 8
10-Jan 9
11-Jan 1
12-Jan 3
13-Jan 0
14-Jan 4
15-Jan 2
16-Jan 6
17-Jan 8
18-Jan 3
19-Jan 1
20-Jan 15

2-After loading the Data into a new schema and new table (Attached)

3-From the Analyzer

  1. Add a new result set Screen Shot 2022-12-01 at 10.06.44 PM.png
  2. Add the previous 2 columns
  3. Enable the running total option for the "No Of Vistors" measure Screen Shot 2022-12-01 at 10.56.02 PM.png
  4. From the Analyzer go to the original insight and display the columns and the new Rating column using a case function as below:
    case(
    between(
    ds_9k_3uh40w.insight.No_Of_vistors,
    1,
    5
    ),
    'Meh',
    between(
    ds_9k_3uh40w.insight.No_Of_vistors,
    6,
    20
    ),
    'Kinda Active',
    between(
    ds_9k_3uh40w.insight.No_Of_vistors,
    21,
    70
    ),
    'Active',
    between(
    ds_9k_3uh40w.insight.No_Of_vistors,
    70,
    200
    ),
    'Super Active',
    ''
    )
  5. It should be like that:Screen Shot 2022-12-01 at 11.02.10 PM.png
  6. Attached here are the used data, Schema, and dashboard.