Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Use set analysis like:

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

View solution in original post

8 Replies
carolin01
Partner - Creator II
Partner - Creator II

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.

carolin01
Partner - Creator II
Partner - Creator II

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

tresesco
MVP
MVP

Use set analysis like:

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

jagan
Partner - Champion III
Partner - Champion III

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.

Not applicable
Author

Thanks tresesco!

This formula worked!

Not applicable
Author

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

paul_scotchford
Specialist
Specialist

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

jagan
Partner - Champion III
Partner - Champion III

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.