8 Replies Latest reply: Feb 3, 2016 9:18 PM by jagan mohan rao appala

# Count If function

Hi All,

This might seem as a very basic question, but I am trying to figure out a formula that will count the number of days that show an aging of 90-120 days old.

Count(if[Aging Days].......

Thanks,
Charles

• ###### Re: Count If function

Hi,

Are you trying to do this within a script or a chart? It´s often said that for performance reason it´s better to do this within the script and then you would create a new colum:

if(AgingDays                    > '90',         ‘0',
if(AgingDays              < '90',         '1',

if(AgingDays         < '120',        '0'))) as AgingDaysCount

Then within your chart you can use Sum(AgingDaysCount)

I hope this helps.

• ###### Re: Count If function

You can also use <=90 and <=120.

• ###### Re: Count If function

Use set analysis like:

Count({<[Aging Days]={'>=90<=120'}>} [Aging Days])

• ###### Re: Count If function

Thanks tresesco!

This formula worked!

• ###### Re: Count If function

Hi,

If you got the Answer please close this thread by giving Correct and Helpful answers to the posts which helps you in getting the answer.

Regards,

Jagan.

• ###### Re: Count If function

Hi

You can easily achieve this by using Set Analysis, which has better performance than IF()

=Count({<AgingDays={'>=90<=120'}>} SomeDimensionName)

Hope this helps you.

Regards,

jagan.

• ###### Re: Count If function

Thanks all for the fast response and support. i got the answer I needed.

• ###### Re: Count If function

In addition, you can explore the Class() function (used in the loader) very handy for banding your age range data.