Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count occurrences of a variable containing a number using grater or lesser than

Hi there qlikview community,

I am still experimenting with qlikview and i have some problems that need solving.

I would like to count occurrences of  variables containing a number using grater or lesser than.I already tried

Count({< [SensorValue] = {'<=[High]>[Low]'} >} [SensorValue])

But it does not seem to work.

Any ideas???

Thanks in advance

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Assuming SensorValue is a field and High and Low are variables, then this should work:

Count({<SensorValue = {"<=$(High) >$(Low)"} >} SensorValue)

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
Not applicable
Author

Hi

try this

count({<SensorValue={"<=(high)>=(low)"}>} SensorValue)

if here high and low are variables then use below exp

count({<SensorValue={"<=$(high)>=$(low)"}>} SensorValue)

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Assuming SensorValue is a field and High and Low are variables, then this should work:

Count({<SensorValue = {"<=$(High) >$(Low)"} >} SensorValue)

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks for the help both of you.

Not applicable
Author

Can this be tranformed to an if condition in order to count only when the condition is satisfied???

jonathandienst
Partner - Champion III
Partner - Champion III

Not sure what you mean. Unless I am misunderstanding your question, that is effectively what the set analysis is doing and set analysis usually performs better than If.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein