Custom Question - null and dates


Have a custom question where I wanna see if an date-field called [Förvantat in datum] is NULL/empty and if so I wanna user another date called [Beräknat ut datum]. If its not empty/null I wanna ofc use that data.

Then I would want to use the SQL function MONTH because I wanna group BY my custom question called Datum.

ISNULL() does not seem to work. Is there another way of checking if a field is null?
I cant get the MONTH funtion to work. Cant see what custom questions support MONTH(). Is there a workaround this?


Hi @aminademirovic
Use coalesce:
You would have to do something like this on previous versions, otherwise an alternative would be to create a Model from SQL in the new 0.42 version:

Ofc.. Did not think of coalesce at all. Thank you so much!!

The group by month thing -Im not sure how I group by my custom question if I just want the month.

@aminademirovic Look at my example, you would have to include all columns in the group by section, and set granularity to Month.
If that doesn't work for you, then you'll have to use SQL.