Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
pashok75
Contributor II
Contributor II

How to use an IF condition and count the records

Dears,

I am having an requirement to apply an IF condition on a field and once its True I need to do a count on another field.

=if(T_TOR_CODE = 'CC', count(distinct T_STATUS = 'APPROVED'))

in the statement  I want if the T_TOR_CODE = 'CC'  then I need to count on a field where T_STATUS = 'APPROVED'

Ashok

11 Replies
vinieme12
Champion III
Champion III

use  -(minus)=(equal)

=count({< T_TOR_CODE = {'DP'}, T_STATUS -= {'APPROVED'}>} T_STATUS)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
sagarkharpude
Creator III
Creator III

=count({< T_TOR_CODE = {'DP'}, T_STATUS ={'*'}- {'APPROVED'}>} T_STATUS)