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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis with Variables- between two variable amount fields

I am trying to show a text box that counts the number of ids that fall within these two variable amounts- vHighDollar and vLow Dollar. I tried this as a set analysis too using the wizard (see below the first calculation) but neither are working

Original Calculation attempt:

=' Targeted Population ' & Num(If(Paid_Amount<=vHighDollar and Paid_Amount>=vLowDollar, count({[1]}ID_Number)),'###,##0')

Set analysis attempt?

=Count({1<={">=$(=vLowDollar)<$(=vHighDollar)"}>}ID_Number)

Once i make a selection of claim number in the list box, I don't want this targeted population number to change.

I have ANOTHER text box next to it that I want to show the same thing except once i make a selection, i want that number to show the count of selections of id numbers that fall between those variable paid amounts.

Could you please show me both ways of doing this (set analysis and if statement)? Thanks!!



1 Solution

Accepted Solutions
sunny_talwar

Try this:

=Count({1<ID_Number = {"=Only({1} Paid_Amount) >= vLowDollar and Only({1} Paid_Amount) < vHighDollar"}>}ID_Number)

View solution in original post

6 Replies
sunny_talwar

May be this:

=Count({1<ID_Number = {"=Paid_Amount >= vLowDollar and Paid_Amount < vHighDollar"}>}ID_Number)

Not applicable
Author

Hi Sunny! That works for the second box, but I want this number to stay static no matter what selection I pick. I tried changing the 1 to $ but that didn't work.

How can I make this number stay the same if I pick an ID that meets these qualifications?

aka its showing 100, when I choose an ID it goes to 1.

sunny_talwar

How do you define vLowDollar and vHighDollar? Are these hardcoded values or expressions?

Not applicable
Author

These are variables that get defined through an input box

sunny_talwar

Try this:

=Count({1<ID_Number = {"=Only({1} Paid_Amount) >= vLowDollar and Only({1} Paid_Amount) < vHighDollar"}>}ID_Number)

Not applicable
Author

Thanks, Sunny!