matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.6k stars 2.62k forks source link

[Bug] Totals row should show filtered totals #21814

Open pbb72 opened 7 months ago

pbb72 commented 7 months ago

What happened?

When the Search function (which is not a search function at all, but a filter function) is used on a table to only show certain rows, the totals row still shows the totals over all rows.

What should happen?

Either the totals row should show the totals for only the filtered data, or another row should be added to show the totals for only the filtered data.

How can this be reproduced?

Go to any table that supports both Search (ie, filter) and Show Totals Row. Enter a filter value, and see that the totals aren't updated.

Matomo version

4.13.3

PHP version

No response

Server operating system

No response

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

No response

Validations

bx80 commented 7 months ago

Thanks for reporting this @pbb72 :+1:

It would certainly be better if the totals row correctly reflected the displayed rows. I'll pass this on to our product team for prioritization.

atom-box commented 7 months ago

Another user asked for this also:

Feature: Pages Like: No Feedback: If I filter the table data via the search input at the bottom of the table the row containing the totals does not update accordingly to the entered query and still show the totals of all pages. Please also note, that the feature "Aggregated rows are displayed" is activated. Thoose values should be excluded from the totals, otherwise this data would be counted twice. By the way: it seems to be a general problem not only for page views.

bojana-z commented 7 months ago

Another user is facing a similar issue. When the report is flattened, the totals are not refreshed in dashboard; it shows the total for the hierarchical report. You need to export the flattened report and summarize the values to see the correct totals.

tsteur commented 6 months ago

Either the totals row should show the totals for only the filtered data, or another row should be added to show the totals for only the filtered data.

It's expected behaviour for the totals row to show the sum of all rows. We would need to add another second row that shows the totals for the matched rows.

pbb72 commented 6 months ago

It's expected behaviour [...]

You state that as if you know every user? I definitely didn't expect this behaviour, otherwise I wouldn't have submitted this bug. Did you mean "intended behaviour" or am I misunderstanding?

tsteur commented 6 months ago

@pbb72 Yes, I meant "intended behaviour" 👍 Sorry for the confusion.

pbb72 commented 6 months ago

Then I think the intended behaviour is wrong (obviously, as I posted this bug report). I still feel a single totals row that displays the totals of the filtered results would be the expected result for most users.

But I guess having two totals rows would be the best of both worlds.

Chardonneaur commented 4 months ago

I got a client asking for this today.

atom-box commented 3 months ago

We had a user get majorly tripped up by this today.

They have been exporting what they thought was a subset, and reporting to their client a falsely high total because of this bug.

Chardonneaur commented 1 month ago

I got a client asking for this feature today.