AnsweredAssumed Answered

Date parameter with no default value: NULL or something else?

Question asked by Dean Flinter on Dec 20, 2017
Latest reply on Dec 20, 2017 by Dean Flinter



I have a dash which starts with a bar chart that is listening to two date parameters for the range.


On selection of a day in the bar chart a pie chart then appears with information for that day.


I decided to change it so that the pie would initially run for the same date range the bar uses but also run for a single day once selected on the bar


I thought I could use a COALESCE function in my datasource query. It looks like this:


AND activity_date BETWEEN COALESCE(${p_date_from_pie},${p_date_from_bar}) AND COALESCE(${p_date_from_pie},${p_date_to_bar})


My thinking was that since the p_date_from_pie parameter has no default value, it would be NULL until a date selection has been made on the bar. Therefore the query would then select p_date_from_bar


However this is not the case. The dash behaves as before with the pie only appearing when a date is selected. I think the issue is that a date parameter with no default value is not actually NULL but something else


Can anyone tell me what that something else might be and perhaps suggest a way to do what I want?