Filter number by several dropdowns

Hi community :wave:

I have a dashboard that is counting the total number of Users in my collection. I have 6 dropdowns and I would like the number being shown to reduce when I select the dropdowns but I have struggled to do this.

Unlike for Charts, there is no option to use traditional filters when pulling the data. I have attempted to write a long formula that uses IF but I got lost after 3 dropdowns because I also have to tell it what to do if a number is empty. For some reason, WeWeb sets a number to its total if there is an error.

Does anyone have a simpler way to filter this number by several dropdowns? Or a prompt I can use to Chat GPT to write the javascript?

Thank you in advance!

Maybe this was too stupid of a question for anyone to answer…? Anyway, I figured it out so thought I would post for anyone else that has the question since this will inevitably be locked.

  1. I created a variable called EmployeeNumber with type Array that was my number of employees.
  2. I created a Global Workflow that updated the variable EmployeeNumber to be my dataset Employees filtered by all of the dropdowns. This is possible if you pull the top-line data set with the metadata but not possible if you pull any of the lower level ones.
  3. I created a page level workflow to execute my Global Workflow whenever the page loads.
  4. I set workflows on each drop down to execute my Global Workflow whenever the dropdowns were changed.

Cheers :wave:

Thanks for your update, sorry nobody took a go at this one. But you got there :slight_smile:

I would have thought it would be easy in weWeb to build the filter on the list of items… maybe using a where group? Not sure if you wanted it to use AND or OR? in the results?

Anyway, thanks for posting your approach.