cube-js / cube

📊 Cube — The Semantic Layer for Building Data Applications
https://cube.dev
Other
17.93k stars 1.78k forks source link

Use input values in calculated measures #1865

Open msmkumaran opened 3 years ago

msmkumaran commented 3 years ago

Is your feature request related to a problem? Please describe. I would like to use one or more user inputs in calculated measures. This will allow me to implement what-if scenarios. For example, if I have insurance liability data and evaluate liability by various dimensions based on the probability of an event occurring (e.g. earthquake), users may input a probability in percentage and measures should recalculated using this value in real-time.

Describe the solution you'd like

  1. Ability to pass custom parameters in query
  2. Availability of these parameters in server side so that they can be referenced in measure formula

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

keydunov commented 3 years ago

Hi @msmkumaran,

Thank you for posting this feature request! It would be a valuable enhancement to Cube.js. We don't have the capacity to work on this feature this quarter, but we will schedule it for later this year.

Meanwhile, please let us know if you'd like to work on this one and we'd be happy to help you with the implementation, and then review and merge it.

github-actions[bot] commented 3 years ago

If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you. If this is the first time you are contributing a Pull Request to Cube.js, please check our contribution guidelines. You can also post any questions while contributing in the #contributors channel in the Cube.js Slack.

msmkumaran commented 3 years ago

Hi @keydunov, Thanks for the response. Unfortunately I'm not able to work on it at this time, sorry.