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

duration field when calculating the average is showing more than 24 hours #39923

Open
hamdyyy9 opened this issue Mar 11, 2024 · 5 comments
Open
Labels
.Frontend Priority:P3 Cosmetic bugs, minor bugs with a clear workaround .Team/DashViz Dashboard and Viz team Type:Bug Product defects Visualization/Tables Raw, summarized, and pivoted tables

Comments

@hamdyyy9
Copy link

hamdyyy9 commented Mar 11, 2024

Describe the bug

we have a column that has hours , minutes and seconds , when you make an average it showed us the hours as 31 hours , will it should round it after 24 for sure.

To Reproduce

  • have some data in duration field with periods in multiple days
  • perform average on this data
  • check the outputted results

Expected behavior

correct
O years 0 mons 34 days 7 hours 46 mins 15.065174 secs
wrong
O years 0 mons 33 days 31 hours 46 mins 15.065174 secs

Information about your Metabase installation

- Google Chrome Version 122.0.6261.112
- Metabase version 0.48.8

Severity

messing up some calculations checks

Additional context

image Screenshot 2024-03-11 120200
@hamdyyy9 hamdyyy9 added .Needs Triage Type:Bug Product defects labels Mar 11, 2024
@paoliniluis
Copy link
Contributor

so you say that we're calculating the average wrong?

@nofalx
Copy link

nofalx commented Mar 12, 2024

We are facing the same issue, it is not that the calculation is wrong but that the format seems to be not correct.

In this case shouldnt the 31 hours be interrupted as + 1 day and 7 hours? As in hours shouldnt go above 24 hours

@hamdyyy9 hamdyyy9 changed the title Hoursn duration field when calculating the average is showing more than 24 hours Mar 12, 2024
@hamdyyy9
Copy link
Author

any updates anyone ?

@paoliniluis
Copy link
Contributor

Ok so what you need is that we format the time correctly, is that the issue then?

@nofalx
Copy link

nofalx commented Mar 19, 2024

@paoliniluis

Thank you ,Yes:

  • We would need to not have the hours exceed 24 hours, but instead add +1 day and show the remaining hours
  • Optionally if possible, it would be nice if we can have multiple formats for duration field (total seconds or duration string)

@ranquild ranquild added Priority:P3 Cosmetic bugs, minor bugs with a clear workaround .Frontend Visualization/Tables Raw, summarized, and pivoted tables .Team/DashViz Dashboard and Viz team and removed .Needs Triage labels May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
.Frontend Priority:P3 Cosmetic bugs, minor bugs with a clear workaround .Team/DashViz Dashboard and Viz team Type:Bug Product defects Visualization/Tables Raw, summarized, and pivoted tables
Projects
None yet
Development

No branches or pull requests

4 participants