Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
PjK2
Contributor
Contributor

less than and greater than in set analysis

I am trying to get all salary amounts less than 3500 and this is the code I used : sum({<Salary= {"<=$3500"}>} amount) but it returns everything and amounts greater than 3500. How do I go about it?

 

Thanks

Labels (2)
4 Replies
Mark_Little
Luminary
Luminary

Hi,

If you are adding the $ symbol will be making the field a string, so less than would now work.

Ensure the Salary field is a number and remove the $ from your set expression.

 

PjK2
Contributor
Contributor
Author

Hi Mark,

Thank  you for your response. 

I have removed the $ but I still get incorrect numbers.

Rams-
Creator
Creator

Try expression : - sum({<Salary= {"<=3500"}>} amount)

RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @PjK2 

This should works

sum({<Salary= {"<=3500"}>} amount)

but if you are still having problems could means that you field has numbers and/or text values

to be sure, create a filter object with the Salary field, and see how the data aligns. values aligned to the left means text, while aligned to right means numbers.

 

Hope this helps,

help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 🙂