Implementing Countif from excel into Desktop Intelligence

Hi-

I am trying to create a countif formula, but am not having much luck. Specifically, for the list of values, I want to be able to do a count where the values in the list are less than a specified amount. Thanks in advance for any help.


meg (BOB member since 2010-04-13)

Hi Meg

Try something like this:

Create a variable that counts the items where the value is less than your specified amount

“=If (<Your Dimension><###) Then 1”

### = enter the number you want to be the mininum

give that variable a name

Then create another variable like this:

=Sum( ForEach (<Your Dimension>))

That should work for you. There are probably many solutions to this problem but this will work. Also, this can all be done in one variable but I like to create multiple variables to ensure I get the resuts I want.

Good luck!

Roland


REB01 :us: (BOB member since 2004-11-29)

Thank you! It worked.


meg (BOB member since 2010-04-13)

Glad to help and “Welcome to B :mrgreen: B!!”


REB01 :us: (BOB member since 2004-11-29)

I have been trying to dot his for such a long time - thank you.

One additional question - I have a table with dynamic values. Is there a way to use this sort of approach to count the number of like values. For example if I have a table with values of 84, 76, 45, 36, 36, 36 ,20, 20, 20 (which result from a predefined count) can a formula use the predefined count to act as value to compare?


NikNac (BOB member since 2010-04-13)

I am not sure I understand your question. Can you provide an attachment which outlines your existing data and then a sample of your desired results?

Thanks


REB01 :us: (BOB member since 2004-11-29)

Do you mean liike creating a local report variable, defined as a dimension object, and counting an associated value?


digpen :us: (BOB member since 2002-08-15)