Skip to Content

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

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,

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 04 at 03:14 PM

    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)

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 04 at 11:12 AM

    This is a cross table, @AMIT KUMAR

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 06 at 11:23 AM

    Thank you!

    Add comment
    10|10000 characters needed characters exceeded