'Aggregate metric per date

I have a data source with data formatted like this:

ID Visits Charges Date Location
33 21 375 2022-01-29 A
34 4285 4400 2022-01-29 B
35 12 2165 2022-01-29 C
36 31 4285 2022-01-30 A
37 40 5881 2022-01-31 A
38 29 4715 2022-01-31 B
39 8 1390 2022-01-31 C

I want to get the aggregated visits of all locations per day, and from there getting the Max value of a day for the time period chosen by the user on a ScoreCard and a Table. At the moment when i choose the max value of the metric visits it only gives me the max value of column (4285), not for the aggregated data per day.

The value i am looking for, in the time period between 28-01 and 31-01 should be 4318 (the sum of all 3 locations for the 29-01, which is the highest of the 3 days)

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source