Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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

7 Replies
its_anandrjs

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]))


Anonymous
Not applicable
Author

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.Capture.PNG

its_anandrjs

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

its_anandrjs

One more way is

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

Anonymous
Not applicable
Author

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

its_anandrjs

Good One

its_anandrjs

You can close the thread now with appropriate answers.