Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Weekly Retention

Hi, I've implemented monthly retention using https://www.youtube.com/watch?v=vbg4Je1tuis Radacad recommendations and i am having trouble doing it on a weekly basis.

I changed it with weeknum as follows:

1) 

first order date (EOW) =
VAR Currentcustomer = entry_events[user_id]
return
CALCULATE(
WEEKNUM(MIN(entry_events[date]),2),
FILTER(
entry_events,
entry_events[user_id]=Currentcustomer
)
)
 
2) 
Weekly Customer retention % =
VAR CurrentWeekAfter =SELECTEDVALUE('WEEKS AFTER'[Value])
VAR CurrentFirstOrderWeek=SELECTEDVALUE(entry_events[first order date (EOW)])
RETURN
DIVIDE(
CALCULATE(
DISTINCTCOUNT(entry_events[user_id]),
FILTER(
entry_events,
WEEKNUM(entry_events[datetime],2)=WEEKNUM(CurrentFirstOrderWeek,CurrentWeekAfter)
)
),
DISTINCTCOUNT(entry_events[user_id])
)
3) 
WEEKS AFTER =
GENERATESERIES(1,10,1)
It says I have a mistake in second step as i guess :))) how should i correct it? any ideas?

1 Reply

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi Anonymous 

    Thanks for reaching out to us.

    Could you share the sample data and expected result? 

    usually information below is needed,

     (1) a sample file, you can replace raw data with bogus data to protect your privacy.

         or provide some sample data that fully covers your issue/question.

    (2) give your expected result and its math formula based on the sample you provide.

    Kindly note: Please ensure the data in sample is concise and representative.

    Thanks.

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.