Skip to main content

Master the COUNT_SELECTED Formula: Efficiently Counting Selected Options

  • December 17, 2025
  • 0 replies
  • 44 views

Forum|alt.badge.img+2

Understanding the COUNT_SELECTED Formula in DealHub
 

The COUNT_SELECTED formula is a powerful, yet often overlooked, tool within the DealHub configuration engine. Its primary purpose is to dynamically calculate the number of options chosen in a multi-select question, allowing you to drive logic, pricing, or visibility based on the "volume" of selections rather than the specific values themselves.
 

How It Works

At its core, the formula scans a target multi-select field and returns an integer representing the total count of active selections.

 


The Logic:

  • User chooses 1 option → Formula returns 1

  • User chooses 3 options → Formula returns 3

  • User chooses nothing →  Formula returns 0

 

Practical Use Case: Product Bundling

Imagine you have a question labeled Product Type with the following options:

  • Hardware

  • Software

  • Support

By creating a hidden "Counter" question and applying COUNT_SELECTED, you can automate backend behavior. 
 

Why Use It?

  • Simplified Logic: Instead of creating complex conditional answer statements to check every possible combination of selections, you get a single number.

  • Dynamic Pricing: Easily calculate surcharges that scale based on how many modules a customer selects. You can then use it to apply a discount or for any other pricing logic.

  • Validation: Use it to create a rule that prevents a user from moving forward if they select more than a specific number of options (e.g., "Select up to 3").

 

Hope it helps !
Feel free to ask any questions.