Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am trying to display the data till end of the last month in line chart.
but it is printing the value of this month also. Please help on it.
Dimension:
if((Month(CanonicalDate)),Date(MonthEnd(CanonicalDate), 'MM/DD/YYYY'),NULL())
Measures:
1. Count({$<DateType={'accessed'}>}invitation_id)
2. count({$<user_signed={1},DateType = {'signed'}>}user_signed)
Regards,
Pramod
{"<=$(=MonthEnd(Max(CanonicalDate), -1))"}
Just use Month(CanonicalDate) or CanonicalDate as the dimension, and filter the expressions like:
=Count({$<DateType = {'accessed'}, CanonicalDate = {"<=$(=MonthEnd(Max(CanonicalDate)))"}>} invitation_id)
=Count({$<user_signed = {1}, DateType = {'signed'}, CanonicalDate = {"<=$(=MonthEnd(Max(CanonicalDate)))">} user_signed)
Your expression is taking max of canonicaldate means present month.
I need till last month.
For ex:
Max(CanonicalDate) is 11-5-2015, Then it will take present month end
How can i restrict to last month
{"<=$(=MonthEnd(Max(CanonicalDate), -1))"}
Is this correct for count of two months
if(mod(Date(monthStart(CanonicalDate), 'MM/DD/YYYY'),2)=0,Date(monthStart(CanonicalDate), 'MM/DD/YYYY'),NULL())
try
Count({$<DateType = {'accessed'}, CanonicalDate = {"<=$(=MonthEnd(addmonths(Max(CanonicalDate),-1)))"}>} invitation_id)