Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to create expression question/chart based on existing questions #10273

Open
dinsaw opened this issue Jun 28, 2019 · 3 comments
Open

Ability to create expression question/chart based on existing questions #10273

dinsaw opened this issue Jun 28, 2019 · 3 comments

Comments

@dinsaw
Copy link

dinsaw commented Jun 28, 2019

Is your feature request related to a problem? Please describe.
I am seeking functionality in Metabase, which allows User to create new question/chart based on expression of existing questions.

For example,
I have following two questions in dashboard panel. These two questions are based on two different tables.

image

Now, User wants to plot conversion rate from views to orders. Currently there is no way to define expression like (OrderCount/ViewsCount) * 100 and plot another chart / create question.

Describe the solution you'd like
I can think of following solutions.

  • Create new expression question screen. Where user can write expression involving multiple questions. Here, User should be able to select only questions which has same x-axis.
    OR
  • In Dashboard, Add new expression chart feature. Where user can select multiple questions and write expression.

In both solutions, expression resolution will happen in client side Javascript code. The Metabase server, should provide results for individual questions and JS code will actually go through each data points to calculate results.

Describe alternatives you've considered

  • The alternative is to write custom sql query using join on timestamp per day. But most of our users are not familiar with SQL.
    OR
  • Calculate expression and store it in database. This will be predefined on time gap and every new expression has to be ingested in database periodically.

How important is this feature to you?
My users are currently using Amplitude for analytics. I am aiming to replace Amplitude with Metabase. This is the key feature provided by Amplitude which is highly used by our users.

⬇️ Please click the 👍 reaction instead of leaving a +1 or update? comment

@tlrobinson
Copy link
Contributor

@dinsaw This should be possible in the next version of Metabase: https://metabase.com/blog/a-query-for-your-thoughts/index.html

I just tried it out and there are still some issues, but we'll be sure this use case works.

@denisesenguel
Copy link

Hmm I don't see how it's possible with the current reworked query builder to get conversion rates (or any sort of custom metric) combining numbers from two different questions in a dashboard chart as in the above example.
It would also be useful to be able to combine not only saved charts that share the same x axis but also saved tables that share a common column. Merging could in the beginning be limited to cases where we have only a couple of rows. Here as well, it should be possible to combine numbers of different saved questions using simple mathematical operations.

We're actually constantly struggling to combine data from different sources. We're using Druid, so connecting data via primary/foreign key connections as in the SQL case is not an option. Also I don't think it's useful to always combine underlying raw data when in fact we just want to divide a couple of aggregated numbers in the end!

@janyo
Copy link

janyo commented Mar 17, 2023

Any movement or expectation on this? Being able to easily do ratios (X/Y from results of different questions) is a super common use case for us. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants