Dashboard question clicking on row triggering another question - native query


#1

Hey there.

I have, let’s say, a bar graph with count of some records. Is there any possibility to take the user to another graph (or data visualization) when I click on one of the bars?

Thanks.


#2

No. There have been various discussions about greater interactivity, there’s probably more on github.
I’m sure it will happen, just not yet.


#3

Moved it to feature request then. I think it is kind of cool, not that hard to implement (sadly I never did anything in clojure). Simply listing all the records in a table would be very effective yet simple.


#4

Is there any other way (atleast a little bit same) how to achieve this?


#5

Surely clicking on View these xxx when clicking on the data, does just that (show the underlying records in tabular fashion)?


#6

I am pretty sure clicking on the bar does nothing on my end. Where do I find the “View these …”? I am not seeing it anywhere on the dashboard.


#7

When you click on the View these it should take you to a table representation of the data associated with that chart element.

If you are looking to ‘redirect’ to a curated version of the supporting data then as @AndrewMBaines mentioned that doesnt appear to be supported from charts. However for Table rendered questions you can approximate this functionality:

  1. Create a dashboard containing the target ‘child’ table

  2. Add a filter to that dashboard and save

  3. Create the ‘Parent’ Question using SQL and construct a url that points to the dashboard created in (1) and parameterize by adding a filter(s) and values(s) pulled by the SQL
    example (postgres syntax):
    select Name, ‘http://[YOUR METABASE SERVER]:3000/dashboard/16?id=’||id url
    from PEOPLE

  4. Save and run.

Okay, wont win any beauty competitions but can provide custom navigation functionality


#8


#9

@nmg that is exactly what i wanted. Problem is, I don’t see the “View these” at all. Could it be caused by using native queries?


#10

@Zdenduk Ah; I would put money on it, yes.


#11

Just tested on a 300 000 000 entry database (which is why it took so long) - sadly the only db collection working in metabase (https://github.com/metabase/metabase/issues/8067). And yes, it is because I am using native query.


#12

So, any other workaround using native query? Btw. thanks so much for helping me.


#13

Do you have permissions / can you instantiate the core of your query (minus any aggregation) as a database view and leave the grouping to metabase? Include an entity id plus foreign key to other tables exposed to metabase would give you a richer experience. Then build a custom question using the view and related tables. (Im assuming your core query is complicated and cannot be easily implemented using exposed source tables and custom query)