Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I have a problem when using date.
I explain. I have two fields (DATE_VALIDATION and CALENDAR.DATE) which contain date values in the format 'YYYY-MM-DD'
I want to create a field which contains values from DATE_VALIDATION for the last 6 months from a certain date selected in CALENDAR.DATE.
For that I create two variables : last6month = addmonths(monthend(max(CALENDAR.DATE))+1,-6) and maxDate= max(CALENDAR.DATE).
I then created a selection which has the following expression : if(DATE_VALIDATION >= $(last6month) and DATE_VALIDATION <= $(maxDate),DATE_VALIDATION)
But the selection list shows me no values.
Someone can explain it ?
Hi,
When you use max()
that time your date field is converted to num format
therefore You have convert your Date_validation field in Num format then compare.
Do like this
if(DATE_VALIDATION >= $(last6month) and num(DATE_VALIDATION) <= $(maxDate),DATE_VALIDATION)
Regards
Still doesn't work
make all your date fields numbers
num(dayStart(your_date_field))
use whatever you want then on the chart use the number tab to make the dates readable
I think I found the problem. I don't know why but it comes from the max function
When I remove max in both variables it works!