Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Nur_Hidayu
Partner - Contributor
Partner - Contributor

How to get data within 60 days

Hi,

i have a data which is report date, renewal status, and subscriber such as follows.  i want to have count of data that is RENEWAL_STATUS = 'RENEWED' and count of sub within the last 60 days from selected month. for example if i select 31/07/2021, it will count all the renewed subscriber within past 60 days which is from june. The date is always the end of the month as this is monthly report.

i've been trying to do this using BELOW set analysis, but it return 0.

=count({<RENEWAL_STATUS={'RENEWED'}, REPORT_DT={">=$(=date(max(REPORT_DT)-60))<=$(=date(max([REPORT_DT))"}>}SUBSCRIBER_ID)

need helps to point out what is wrong with my code?

Nur_Hidayu_0-1649957200201.png

Thank you.

Labels (4)
1 Reply
vchuprina
Specialist
Specialist

Hi,

I would recommend you check the date format of the REPORT_DT field and the date format of the date(max(REPORT_DT)-60 and date(max([REPORT_DT) conditions. 

I guess they don't match and for this reason, you can't see data.

You can change the date format by adding a second parameter to the date function, for instance: 

date(max([REPORT_DT), 'DD/MM/YYYY')

Regards,

Vitalii

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").