4 Replies Latest reply: Jul 12, 2017 10:01 PM by Wai Meng Leong

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

• 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

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

Hi Devarasu,

The below works well totally.

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

As for the rest, thanks for your suggestions and help as always!

Regards,

Wai Meng

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

Hi,

Re: greater than value

• 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]))