# New to QlikView

Discussion board where members can get started with QlikView.

Announcements

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???

1 Solution

Accepted Solutions
MVP

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

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
5 Replies
Not applicable

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

Hi

try this

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

if here high and low are variables then use below exp

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

MVP

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

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

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

Thanks for the help both of you.

Not applicable

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

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

MVP

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

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