Limit Per Group

We have a table of daily reports and I would like to group by month and get the latest record for each month. That way I can convert daily reports to monthly reports without building a new table. This would then be displayed in a trend component where we can see the percent change. How do I do this in Metabase?

Hi @bvallelunga
You would have to do that with a Native/SQL question. Currently the Max()/Min() functions doesn’t handle dates.
https://github.com/metabase/metabase/issues/4482 - upvote by clicking :+1: on the first post

@flamber hmm I think what I am asking for is a little different. For example if Max()/Min() did work on dates all we would have is the max date in a group. Really what I need is to get the entire row (and all of it’s columns) for the max date for a given grouping. So if we group per month, I would need to get in each month the row that has the last day of the month.

@bvallelunga
Not sure what type your date columns are, but min/max doesn’t work for datetime-style types.
Until expressions for Custom Column handles dates, then you will not be able to use the interface, you would need to do this in SQL.
https://github.com/metabase/metabase/issues/11330 - upvote by clicking :+1: on the first post