Zooming in on underlying data when creating a native query

I am making a line chart using a native query which simply shows the daily order value. I have put a Date filter and a channel filter (just the source from where we get our orders). the query is:

select cast(date as date) as date, sum(Order_value_sp) as OrderVal from mainorders
where {{date}} [[and {{channel}}]]
group by cast(date as date)
order by cast(date as date)

if I create the same result using the ‘Custom question’ feature, I can hover over a data point and then get many option like - ‘Zoom in’, ‘Xray’, ‘view these orders’ etc. But, with the result generated from the native query I don’t get any such option. I would like to know how can I get this feature while writing native queries.

Hi @avishbhasin
Drill-through and X-rays are only available for Simple/Custom questions, since Metabase is not parsing the SQL, so it doesn’t know how to generate a query from that.

Is there any way through which the user can see the data or any sort of summary of the data through the result generated by native queries on a dashboard?

@avishbhasin No. But you can return the results un-grouped and then group the results with a Saved Question:
https://www.metabase.com/docs/latest/users-guide/custom-questions.html#picking-your-starting-data

Would the new dashboard drill feature in 0.37 allow for this? Use it to navigate from one dashboard to another.

@AndrewMBaines Yes, you can link to another dashboard/question/URL, but that doesn’t do a Zoom, X-ray, View these… etc. There’s no way to do drill-through unless Metabase was parsing the SQL and could then un-wrap parts of that.

1 Like

OK - thanks. It meets my use cases, didn’t think beyond that!