BusinessObjects Board

Count in a List

Hi,
I have a list with this value:

Col. Check Count
AAA ok 2
AAA ok 2
AAA ko 1
AAB ok 1

I want know for each “Col.” how many “ok” I have. The value I’ll waiting in coloumn “Count” is 2 for each OK of Col = AAA not for AAB.

Thanks

What have you tried? Are you getting an error or just the wrong value?

It returns the count = 1 for each row with count.
Then I tried CountAll buti it returns 1, 2, 3.

Now I try with the function IF check = ok then count else…

I am not completely understanding your question. However, try a variable with a formula something like this…

=Count([Col.]; All) Where (Upper([Check]) = "OK")

thank you!
I change the function but now it returns:

Col. Check Count
AAA ok 1
AAA ok 1
AAA ko
AAB ok

Why??

I am not sure. Can you provide a screen shot? I am guessing there are details not mentioned that are having an impact.

the last coloumn it returns 1 and not 2 2

You are getting “1” because of what is called a calculation context. I am not great at explaining these concepts so I refer to these blog posts…

Removing the Confusion from Calculation Contexts
Calculation Context Part I: Overview

I think if you were to remove any column that makes your first two rows unique your count column would be what you want. I think that is just the 5th column, Stato Convenzione. If you want to keep that column then you need to alter the default calculation context (i.e., the columns in your table) in your count formula. So try something like this…

=Count([Col.]; All) ForAll([Stato Convenzione]) Where (Upper([Check]) = “OK”)

The ForAll() function will remove Some Date from your calculation context.

image

2 Likes

okay, thank you for support and for link! :slight_smile:
Now check how do it…