Assign a special default value to GL_PERIOD and CUSTOM_PERIOD like '01-01-1970' and then in the prompt instead of selecting the default as Session variable, select the default as SQL and write:
Select "Dim Date"."Period" from "Subject Area" where "Dim Date"."Period" = case when VALUEOF(GL_PERIOD) <> '01/01/1970' then VALUEOF(GL_PERIOD) else VALUEOF(CUSTOM_PERIOD) end
Try IFNULL function
Thanks for the suggestion FTisiot, but I'm trying to get a cleaner solution.
I tried this Srini as ideally this would be the prefered solution, but unfortunately it doesn't work. No values are returned in the prompt.
Can you try by creating already in the init block the logic IFNULL(NQ_SESSION.GL_PERIOD,NQ_SESSION.CUSTOM_PERIOD) and assign it to a new variable "FILLED_PERIOD"?