Custom date ranges and variables in output SQL

We have recently started using Domo, and a lot of our reports require two date ranges (current and previous) for various % calculations.

Currently, I don't see any way to do that in the card on output dataset. All data has to be "pre-baked" and ready for the reports. The only way that could be done is to inject variables into SQL and then replace them with the selected values.


Here is an idea for custom date ranges feature in domo:


1) Add functionality to DataFlow's Output DataSet (or, event add additional output type such as "Output DataSet Template") where you could plug in date range variables in SQL:


For Example:


WHERE created_at >= {$current_start_date} AND created_at < {$current_end_date}

and for the previous date


WHERE created_at >= {$previous_start_date} AND created_at < {$previous_end_date}


2) Add second date range field option in the card so you could pick which date field to use for the previous SQL filter above.


The way I could imagine this could function is that when creating a card using a DataSet with custom variables injected into SQL, variable {$current_start_date} and {$current_end_date} could have assigned values from the first date range field on the card. Then, variable {$previous_start_date} and {$previous_end_date} could have assigned values from the second date range field. In the background, Domo would build the SQL and run it against the dataset.


Would that make sense? Maybe that could be another type of the card? Either way, I think injecting variables into output dataset would make a big differece.



0 votes

· Last Updated

This discussion has been closed.