4 Replies Latest reply: Mar 20, 2014 6:28 AM by Michal Kwater

# Count function

Hello,

I am an new member and I would like to set an expression with a count function.

I have a data :

 Name Category Subcategory P1 31 P2 32 A ZZZ Other 60,00 5,00 35 2 B ZZZ Other 1 70,00 532,00 25 65 C XXX Other 80,00 5,00 34 5 D XXX Other 1 90,00 35,00 90 35 E ZZZ Other 363,00 5,00 25 35 F XXX Other 60,00 5,00 35 2 G ZZZ Other 1 70,00 532,00 25 65 H XXX Other 80,00 5,00 34 5 I ZZZ Other 1 90,00 35,00 90 35 J XXX Other 363,00 5,00 25 35

I would like to count a number of names which will be restricted by category 'XXX' and (P1+31 - P2 - 32) >0

I also attached QV for support

Another issue I have is count how many largest 'name' will make 80% (P1+31)  for subcategory.

If someone could help I will be grateful .

Many thanks in advance

• ###### Re: Count function

sanchopancho wrote:

I would like to count a number of names which will be restricted by category 'XXX' and (P1+31 - P2 - 32) >0

Your expression should be:

Count({\$<Name={'=[31]+[P1]-[32]-[P2]>0'},Category ={'XXX'}>} Name)

sanchopancho wrote:

Another issue I have is count how many largest 'name' will make 80% (P1+31)  for subcategory.

• ###### Re: Count function

Hi Nicole,

Nicole Smith wrote:

Your expression should be:

Count({\$<Name={'=[31]+[P1]-[32]-[P2]>0'},Category ={'XXX'}>} Name)

I tried it and I have an "error in set modifier ad hoc element list" in my expression .

Also there is a red mark under ]-[ between second subtraction.

Do you have any idea why ?

• ###### Re: Re: Count function

Hi,

Check if attached expression works for you.

And your second requirement should be possible using teh approach that Nicole mentioned in her reply.

Rgds,

SK

• ###### Re: Count function

Thanks very much .

It works for me