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

Improve evolution column in all websites tab #13124

Open
fdellwing opened this issue Jul 2, 2018 · 6 comments
Open

Improve evolution column in all websites tab #13124

fdellwing opened this issue Jul 2, 2018 · 6 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. RFC Indicates the issue is a request for comments where the author is looking for feedback.

Comments

@fdellwing
Copy link
Contributor

So, there is something going on my nerves for quite some time now:

If you had 0 visits yesterday and any visit today, it shows 100%.
If you had 1 visit yesterday and more than 2 today it shows a value more than 100%.

This is mathematical correct, but in imho a big problem.

Take the following scenario:
Changes are like 0 -> 500 and 1 -> 20. Than it shows 100% for the first and 1900% for the second evolution. Implying that the second one increased more than the first one, which is absolutely wrong.

I do not really have a solution right now, but maybe someone else? Or do you not see a problem with that?

matomo1

@tsteur
Copy link
Member

tsteur commented Jul 2, 2018

Yeah I know exactly what you mean. Not sure how to fix though, maybe in the UI could show something like "New" but I presume the API would maybe still expect some number or so.

@fdellwing
Copy link
Contributor Author

I thought about using ∞ (∞) instead of 100%, but that is also not a valid number, so duh.

@fdellwing
Copy link
Contributor Author

fdellwing commented May 10, 2019

I thought about this some more.

Instead of changing the output, it might be better to change the input?

} else if ($divisor == 0) {
return 1;
} else {

Here it is hard coded to return 100% if the old value (divisor) is 0. Well we could instead provide an arbitrary divisor for the calculation.

I think there are 2 possible arbitrary numbers to choose from:

return Piwik::getQuotientSafe($dividend, 1, $this->quotientPrecision + 2);

Will return the same as if the old value was 1.

return Piwik::getQuotientSafe($dividend, 1.0E-10, $this->quotientPrecision + 2);

Will return a huge number and is easily distinguishable from the old value 1.

What are your thoughts with this? @tsteur

@tsteur
Copy link
Member

tsteur commented May 12, 2019

Not really sure what is best here. Maybe @mattab has some thoughts.

@Findus23 Findus23 added Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. RFC Indicates the issue is a request for comments where the author is looking for feedback. labels May 24, 2020
@dev-101
Copy link

dev-101 commented Feb 22, 2021

@dev-101
Copy link

dev-101 commented Feb 22, 2021

Anyway, once I spoke with someone who was in financial business / calculations and told me that if initial value is 0, than whatever next positive value comes up (e.g. next month) it's assumed to be 100%. Because, strictly mathematically speaking, it would be +inf (division by 0). I think it is just an assumption / by convention, depending on department, field etc. By that logic, if you dropped from a positive value to 0, it should be -100% by that very same convention. And, if you think about it, then it makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. RFC Indicates the issue is a request for comments where the author is looking for feedback.
Projects
None yet
Development

No branches or pull requests

5 participants