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

Hi Darren, thank you for your respond and sorry for the late reply. I watched your demonstration but I haven’t quite figured out how to do it. I’m currently feeding my query through User Specific Column to match their chosen Time Frame, but I’m still confused on how to create the logic for the query to switch from Time Frames filter to look for specific dates if the user choose so. this might be achievable by seeing your logic on the Sales Table and not on the query itself, but I can’t quite wrap my head around it. could you please explain further?

In my opinion, you will need to duplicate the data and component, and then adjust visibility so the correct table shows on layout.

So this would mean I also need to duplicate the computation?

1 Like

The App that was used in my video is available as a copyable template, so feel free if you like to make your own copy so you can study it.

1 Like

Yes