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

[Lens] Math operation in formula nulls if any of the operations has null results #140829

Closed
Tracked by #57708
dej611 opened this issue Sep 15, 2022 · 1 comment · Fixed by #142087
Closed
Tracked by #57708

[Lens] Math operation in formula nulls if any of the operations has null results #140829

dej611 opened this issue Sep 15, 2022 · 1 comment · Fixed by #142087
Assignees
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@dej611
Copy link
Contributor

dej611 commented Sep 15, 2022

Describe the bug:

When using Lens formula with a math operation, if any of the operators has a null result, that leads to a null the entire formula.
For instance, the following formula will be given a lower result (null) compared to a subset of it without the math operation:

average(bytes, kql='geo.dest: "US"') + average(bytes, kql='geo.dest: "DE"')

Here you can compare with the average(bytes, kql='geo.dest: "US"') counter part (column 3 of the table):
Screenshot 2022-09-15 at 16 31 30

Expected behavior:

I can consider two expected behaviour here:

  • not null the full formula, rather consider it as 0 in case of null for any operator
  • add some documentation about the behaviour, either in-app or in the Lens advanced page
  • add a new function to fallback null values to a given value (default( 0, average(bytes, kql='geo.dest: "US"')) + ...)
@dej611 dej611 added bug Fixes for quality problems that affect the customer experience Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Sep 15, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@flash1293 flash1293 added enhancement New value added to drive a business result and removed bug Fixes for quality problems that affect the customer experience labels Sep 15, 2022
@dej611 dej611 assigned dej611 and unassigned dej611 Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants