Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a requirement to calculate the average of users in 3 months, 6 months, YTD.
How do I write this logic for YTD and hardcode it?
I would really appreciate your help!
Thanks!
Perhaps this? And you can ignore selection using strike though enabled.
num(((count({<USER_MONTH ={"$(=MONTH(Date(addmonths(Max(CREATEDDATE),-2), 'MMM')))"}, DateField = {">= $(=YearStart(Max(DateField))) <=$(=Max(DateField))"}, Year=, Week=, Quarter=>} distinct USER)
+count({<USER_MONTH ={"$(=MONTH(Date(addmonths(Max(CREATEDDATE),-1), 'MMM')))"}, DateField = {">= $(=YearStart(Max(DateField))) <=$(=Max(DateField))"}, Year=, Week=, Quarter=>} distinct USER)
+count({<USER_MONTH ={"$(=MONTH(Date(addmonths(Max(CREATEDDATE),0), 'MMM')))"}, DateField = {">= $(=YearStart(Max(DateField))) <=$(=Max(DateField))"}, Year=, Week=, Quarter=>} distinct USER))/3)
/count({<CREATEDDATE ={"=$(=Date(Max(CREATEDDATE), 'MM-DD-YYYY'))"}, DateField = {">= $(=YearStart(Max(DateField))) <=$(=Max(DateField))"}, Year=, Week=, Quarter=>}distinct USER)*100,'#,##0.0')