0

# Count number of columns where ... (Count if) Sap BO

Apr 03 at 03:22 PM

35

Hi all,

I have an information like that:

Code StockW1 Stock W2 Stock W3

33331 10000 50000 40000

33332 -1000 -3000 -5000

33333 -3000 10000 200000

And I need an extra column that counts the number of columns where the Stock is negative:

Code StockW1 Stock W2 Stock W3 Count Negs:

33331 10000 50000 40000 0

33332 -1000 -3000 -5000 3

33333 -3000 10000 200000 1

I was using this formula: =Count([Stock])Where([Stock]<0) but it returns sth like that:

Code StockW1 Stock W2 Stock W3 Count Negs:

33331 10000 50000 40000

33332 -1000 -3000 -5000 3

33333 -3000 10000 200000 3

Can you help me? Which function should I use?

Thanks,

is it in table or crosstab?

AMIT KUMAR
Apr 04 at 03:14 PM
0

try this.

Add one more column at the end with right click->sum-> option "at the end of the row"

place below formula.

=Sum(If([Stock]<0) Then 1 Else 0)

Share
Patrícia Costa Apr 04 at 11:12 AM
0

This is a cross table, @AMIT KUMAR

Share
Patrícia Costa Apr 06 at 11:23 AM
0

Thank you!

Share