Skip to main content
Question

Dynamically Filter Line Chart with Formula Queries (or open to better ideas to do this)

  • Mar 8, 2026 10:58 PM UTC
  • 3 replies
  • 147 views

Forum|alt.badge.img+11

Hi everyone, I had a user request a line chart that is filterable by contact showing the Total Opportunities Created as one line and another line showing the total revenue generated. The idea is the lines would have 2-3 colors per set (YTD, last year, 2 years ago) and would be filterable by the contact they select. The challenge is to my knowledge you cannot dynamically filter formula queries. So how would you go about this? Basically when he does his quarterly business review meetings with clients he wants to pull up a chart showing how many opportunities we generated and how much revenue generated for that person. Than switch to another person for the next meeting

3 replies

MarkShnierYou
Forum|alt.badge.img+24

Can you tell us a little more about the structure of your app. You may not have relationships, but what are the records that are holding these totals and what are the formulas queries summarizing? What are the sort of child tables. 


MarkShnierYou
Forum|alt.badge.img+24

Well, I gather from your question that your chart is simply a report of opportunities. So it's just filtering which opportunities will show.


Top Step
Forum|alt.badge.img+9
  • Registered
  • Oct 19, 2026 4:21 PM UTC

You don't need formula queries for this. Build the charts right on the Opportunities table and let a dashboard filter handle switching contacts.

Add two formula - text fields on Opportunities, one for the month and one for the year the opportunity was created:

Right("0" & ToText(Month(ToDate([Date Created]))), 2)
ToText(Year(ToDate([Date Created])))

Make a line chart with the month field on the x axis, a count of opportunities on the y axis, and the year field as the Series. Each year becomes its own colored line, so this year, last year and two years ago sit on top of each other. Filter the report to the last three years.

Make a second line chart the same way with your revenue field summed on the y axis. Keep them as two charts. Series isn't available on a dual y axis chart, and count and revenue are on very different scales anyway.

Put both charts on a dashboard and add a Text filter on the contact field, applied to both reports. In the meeting he picks the contact at the top of the dashboard, both charts update, and he switches to the next person.

https://help.quickbase.com/docs/get-data-into-bar-line-and-area-charts 

https://help.quickbase.com/docs/quickbase-using-dashboards