I want to group the SubmitDate into (0-4wks, 4-12wks, 12-52wks, > 52wks)
In Excel, I was using formula =SUMPRODUCT((SubmitDate<TODAY()+1)*(SubmitDate>=TODAY()-28)) =SUMPRODUCT((SubmitDate<TODAY()-28)*(SubmiteDate>=TODAY()-96)) =SUMPRODUCT((SubmitDate<TODAY()-96)*(SubmitDate>=TODAY()-365))
I think the formula is something like: if isnull({CQConverted_.Submit_Date}) then '>52wks' else if {CQConverted_.Submit_Date} < today & >= today-28 then '0-4wks' else if {CQConverted_.Submit_Date} < today-29 & >= today-96 then '4-12wks' else if {CQConverted_.Submit_Date} < today-97 & >=today-365 then '12-52wks' else if {CQConverted_.Submit_Date} <today-366 then '>52wks' else {CQConverted_.Submit_Date}
But I just do not know the exact format on how to accomplish (< today & > today-28). Can someone please help me?
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 02 Mar 2011 at 6:42am
Maybe...?
if isnull({CQConverted_.Submit_Date}) then '>52wks' else if datediff('d',{CQConverted_.Submit_Date},currentdate)<=28 then '0-4wks' else if datediff('d',{CQConverted_.Submit_Date},currentdate)<=96 then '4-12wks' else if datediff('d',{CQConverted_.Submit_Date},currentdate)<=365 then '12-52wks' else if datediff('d',{CQConverted_.Submit_Date},currentdate)>366 then '>52wks' else 'Not identified'
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum