cancel
Showing results for 
Search instead for 
Did you mean: 

CountIf...my formula is not working...

Former Member
0 Kudos

I need to count the number of names if the corresponding value is =>9000.

I wrote the following variable.

=Count([Name]) Where ([Value]>=9000)

In the below example, the answer should be 2.

But it is not working...

It returns 3, which is maximum number of names available in the object.

[Value] is string, but is turned to measurement, using the following formula


=ToNumber([Value])

Could any one please provide insight onto what I am doing wrong here...?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Your formula should be as below

=Count([Name] Where ([Value]>=9000))


Regards

Niraj

Former Member
0 Kudos

If its a string then use below

Create a Measure as [NewValue]=If IsError(ToNumber([Value])) Then 0 Else ToNumber([Value])

Then use it to count

=Count([Name] Where([NewValue]>2000))

Former Member
0 Kudos

The IsError() part will allow you to handle exceptions that may occur if anything other than number comes in to [Value]

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you so much all!!!!

former_member199945
Active Contributor
0 Kudos

Convert value object as dimension and use count formula  for  this dim object.

Thanks

amitrathi239
Active Contributor
0 Kudos

create dimension variable V Value=ToNumber([Value])

=Count([Name]) Where ([V Value]>=9000)

former_member198519
Active Contributor
0 Kudos

Try:

=Count([Name]) Where (Tonumber([Value])>=9000)