Data drilling? (day->week->month->year)

Hello,is it possible to drill data by redash? For example, I have a col (date: yyyy-MM-dd) . I want to get day,week or month data by drilling data.

I think you can achieve a basic kind of drilldown using a table visualisation and setting the “Display as” setting for the column to “Link”. You can then set the URL value for the column to be a link to another query, using the value of the column as a parameter value (in the URL).
You query in the drill down would need to take the date and convert it to a week or month or whatever.

Another way to drilling your data is using date_trunc() function. Then combine this with query parameter on redash.

SELECT date_trunc('{{time_dimension_parameter}}', date_column) as time_dimension, metrics
FROM table
GROUP BY time_dimension

Then you just had to create a dropdown list for time_dimension_parameter parameter containing:
Year
Month
Week
Day

Then you can change your time dimension as you wish using the query parameter

1 Like