# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor II

## Count of values (Greater than or lesser than)

Hi all,

I have a field(TOTAL GOALS) which has values 1, 2, 3, 4, 5, 6, 7, ....

How do I create in a simple table, a column which counts the number of times TOTAL GOALS is:

>0.5,

<0.5,

>1.5,

<1.5

etc...

Regards,

Wai Meng

1 Solution

Accepted Solutions
Honored Contributor II

## Re: Count of values (Greater than or lesser than)

Hi

Can you share your expected result and elobrate bit. thanks

you have try like below nested if

if(TOTAL_GOALS >0.5, Count( TOTAL_GOALS),

if(TOTAL_GOALS <0.5, Count( TOTAL_GOALS),

if(TOTAL_GOALS >1.5, Count( TOTAL_GOALS),

if(TOTAL_GOALS <1.5, Count( TOTAL_GOALS)))))

or set expression like below

=Count({<TOTAL_GOALS = {">0.5"} >} DISTINCT TOTAL_GOALS)

Thanks,Deva

4 Replies
Honored Contributor II

## Re: Count of values (Greater than or lesser than)

Hi

Can you share your expected result and elobrate bit. thanks

you have try like below nested if

if(TOTAL_GOALS >0.5, Count( TOTAL_GOALS),

if(TOTAL_GOALS <0.5, Count( TOTAL_GOALS),

if(TOTAL_GOALS >1.5, Count( TOTAL_GOALS),

if(TOTAL_GOALS <1.5, Count( TOTAL_GOALS)))))

or set expression like below

=Count({<TOTAL_GOALS = {">0.5"} >} DISTINCT TOTAL_GOALS)

Thanks,Deva

Esteemed Contributor III

## Re: Count of values (Greater than or lesser than)

Hi,

Re: greater than value

MVP

## Re: Count of values (Greater than or lesser than)

May be use a Valuelist function like this

Dimension

ValueList('>0.5', '<0.5', '>1.5', '<1.5')

Expression

Pick(Match(ValueList('>0.5', '<0.5', '>1.5', '<1.5'), '>0.5', '<0.5', '>1.5', '<1.5'),

Count({<[TOTAL GOALS] = {'>0.5'}>}[TOTAL GOALS]),

Count({<[TOTAL GOALS] = {'<0.5'}>}[TOTAL GOALS]),

Count({<[TOTAL GOALS] = {'>1.5'}>}[TOTAL GOALS]),

Count({<[TOTAL GOALS] = {'<1.5'}>}[TOTAL GOALS]))

New Contributor II

Hi Devarasu,