Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count function based on input variable

Hi experts,

i have the following situation:

I created a input box that''s sets a variable called vIncomeBorder.

Now i would like to show in a PIE chart (i think that is most obvious ?! ) how many people are below and how many above the variable are.

So I made the following expressions so far:

=Count({< Income =< $vIncomeBorder>} REGISTRATIONID   // below

=Count({< Income => $vIncomeBorder>} REGISTRATIONID   // above

what mistake do i make in the expressions??

3 Replies
giakoum
Partner - Master II
Partner - Master II

=Count({< Income ={"<=$(=('$(vIncomeBorder)'))"}>} REGISTRATIONID )

Not applicable
Author

First thnx for your quick response.

If i try your expression it shows the PIE chart based on the income.

What i would like to achieve is the following:

i have the following data.

personId  income

1               100

2               112

3               115

4               120

5               125

then i have a variable that is based on a input, let say variable = 118.

Then my pie chart must have two element.

one color that says 60% below

one color that says 40% above

giakoum
Partner - Master II
Partner - Master II

see attached.

Pie chart is not the best choice, I would use two descriptive text boxes instead.