Sales Dashboard: Dynamic Date Filtering with Single Computation Table - Query vs Relation Approach

I’m building a sales dashboard with time frame filters (Today, This Week, etc. & Custom Range). Currently using:

  • Order table with Math columns that numerize date values
  • Dashboard table with relations matching those numerized timeframes
  • Rollup calculations based on those relations

I want to add custom date range selection while keeping everything in one computation table. The challenge: Query columns have fixed conditions, so I can’t dynamically switch between preset timeframes and custom ranges within a single Query.

Question: Is there a way to avoid duplicating all my Rollup calculations while still supporting both preset and custom date filtering? Or is calculation duplication the necessary trade-off for this functionality?

P.S : Shout out to Mr.Robert Petitto for this genius setup



Write your date range selection to user specific columns, then use those to feed the query.

By the way, the below may be of interest.

2 Likes