7 Replies Latest reply: Sep 29, 2017 3:57 PM by Anand Chouhan

If Statement with AutoCalendar field

I am trying to show both year and month with the following statement:

if(year([first_paymnt_date.autoCalendar.YearMonth])<=2014,'',year([first_paymnt_date.autoCalendar.YearMonth]))

Any suggestions of how to combine year and moth?

Thanks

• Re: If Statement with AutoCalendar field

I believe this field [first_paymnt_date.autoCalendar.YearMonth] is your date field then take Year, Month from this field like

Year([first_paymnt_date.autoCalendar.YearMonth])

Month([first_paymnt_date.autoCalendar.YearMonth])

=if(year([first_paymnt_date.autoCalendar.YearMonth]) <= 2014,'',year([first_paymnt_date.autoCalendar.YearMonth]) &Month([first_paymnt_date.autoCalendar.YearMonth]))

• Re: If Statement with AutoCalendar field

Great code, but one problem.  At the beginning of my series I have out of phase calculation.  I have filter by year and for every year the line graph starts at an unusual peak.  Not sure there is some additive function in the calculation.  I read somewhere that the autoCalendar is a little buggy.  I am attaching the pic.

• Re: If Statement with AutoCalendar field

I didn't here about the autoCalendar there might be Master calendar though.

• Re: If Statement with AutoCalendar field

One more way is

=if(year([first_paymnt_date.autoCalendar.YearMonth]) <= 2014,'',year([first_paymnt_date.autoCalendar.YearMonth]) &'-'&Month([first_paymnt_date.autoCalendar.YearMonth]))

• Re: If Statement with AutoCalendar field

Thanks,  I found my error in my measure it was counting the Nulls and blanks.

• Re: If Statement with AutoCalendar field

Good One