Pass a filter to the original query via bridge query

I had the SQL query for cohort analysis with variables:


And for visualization as Pivot table i also have kinda "bridge" query:

So, i want to add my pivot table to dashboard, but i can't set variables of root table with dashboard.

There is any suggestions? I have no idea how to do it :frowning:

Hi @galamsharx
It's currently not possible to pass-thru variables to nested questions:
https://github.com/metabase/metabase/issues/6449 - upvote by clicking :+1: on the first post

Thanks for answer! Are there other ways to solve this problem? Maybe i can build a Pivot Table through the Root table without using the "Bridge" query?

@galamsharx You'll need to return all results, so the filtering can be done in the GUI. Or create a view. Anything that doesn't involve trying to pass-thru a variable in a nested questions.

Can you elaborate on the view creation method? I think it might help me with this problem.

@galamsharx I don't know which database you're using, but create a view on your database, then Metabase will see that view as a regular table.

@flamber I use postgresql. I just don't fully understand how to implement it. How can I pass some dynamic values through View? Also my SQL query uses window functions.

@galamsharx You would either have to settle for the old pivoted table (Table visualization, not Pivot Table). See comments:
https://github.com/metabase/metabase/issues/3188 - upvote by clicking :+1: on the first post
Otherwise you'll need to wait until one of several issues are implemented. There's no other solutions currently, you cannot pass-thru to nested questions.

@flamber I would love to use Table visualization, but unfortunately I can't find it. I was originally looking for one, but since I could find it, I decided to display it as a Pivot Table. Another user has these options in Table visualization (link: Graphic Cohort · Issue #3188 · metabase/metabase · GitHub), I don't understand why I don't have it.
I had v.0.44.6, version v0.45.0-RC1 installed, but no luck.


@galamsharx The old pivoted table requires that there are 3 columns - no more, no less. It only works with that. If you need more columns, then it's not an option.

OMG, thanks! I didn't know about this condition. You saved me! <3