superset icon indicating copy to clipboard operation
superset copied to clipboard

Fraction with static metric in denominator and dynamic metric in numerator.

Open kaspergaj opened this issue 7 years ago • 1 comments

EDIT: The section Actual Result was not exactly correct. Make sure these boxes are checked before submitting your issue - thank you!

  • [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [x ] I have reproduced the issue with at least the latest released version of superset.
  • [x ] I have checked the issue tracker for the same issue and I haven't found one similar.

I want to make a chart where the value in the numerator can be chosen by a filter box while the denominator is fixed for any choice in the filter box.

My data looks like this, the chart is grouped by the column "Kommune/Forsyning": image

Here I defined the static denominator as a metric in the datasource image

Here is what I imagine the metric should be defined image

The user is then supposed to choose values in the list of "H-kode" by a filter box.

Expected results

If the user chooses "H02" or "H05" the value should be positive (and divided by the same denominator) otherwise 0.

Actual results

I get no values in the bar chart. Also it seems like the denominator still depends on the filter box.

Steps to reproduce

  • Define metric in datasource
  • Define metric in the chart that partially depends on the first metric.

kaspergaj avatar Apr 09 '19 10:04 kaspergaj

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Jun 08 '19 16:06 stale[bot]