Issue with the date filter on the dashboard

Hello,

I'm having trouble with the date filter in a dashboard.

Here is my "question." As you can see, the query calculates the total revenue (sum of TotalPaid) and the total bookings for the current year and last year. I'm using PostgreSQL as the database, and "CA Y-1" and "BOOKINGS Y-1" use the Offset function.

  • For "CA Y-1": Offset(Sum([TotalPaid]), -364)
  • For "BOOKINGS Y-1": Offset(Count, -364)

As you can see, I get results, so it works.

If I add a date filter to the query, it works as well (see the next screen).

The problem arises when I add this "question" to the dashboard.

As you can observe, "CA Y-1" and "BOOKINGS Y-1" are empty, even though they were populated with a date filter in the "question" section.

I checked the logs and found this :

2025-01-10 14:45:42 2025-01-10 13:45:42,935 ERROR middleware.process-userland-query :: Error saving field usages
2025-01-10 14:45:42 clojure.lang.ExceptionInfo: Unknown type of ref {:ref [:sum {:lib/uuid "b6f20de0-3edb-4e19-b59f-28c00659ce28"} [:field {:base-type :type/Float, :lib/uuid "e458345f-b32b-4bd5-9edd-824c1ebf9c44"} "TotalPaid"]]}
2025-01-10 14:45:42 at metabase.lib.equality$find_matching_column31950__31953.invokeStatic(equality.cljc:308)
2025-01-10 14:45:42 at metabase.lib.equality$find_matching_column31950__31953.invoke(equality.cljc:264)

I do not understand the origin of the problem. Your help will be very much appreciated.

Best Regards,