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

Count ID based on field

I have two Columns - ID and Status

 

ID

1

2

3

4

..

 

Status

Running

Pending

Complete

I have to count all the IDs that have more than one Running or Pending or Complete Status

Labels (1)
13 Replies
qlikwiz123
Creator III
Creator III
Author

@sunny_talwar 

 

Sorry. I corrected the file now.

sunny_talwar

This worked for me

Count(DISTINCT {<ID = {"=Count({<Status = {'Complete'},MonthYear ={[>=$(=MonthName(addmonths(today(),-12)))]}>} Status) > 1"}>} ID)
qlikwiz123
Creator III
Creator III
Author

Count(DISTINCT {<ID = {"=Count({<Status = {'Running', 'Complete', 'Pending'}>} Status) > 1"}, Status = {'Running', 'Complete', 'Pending'}>} ID)

 

This is still acting up.

qlikwiz123_0-1623767371108.png

 

For ID A560591, it is counting even though it only has 1 complete and 1 Running. My condition is to count when Count of Running or Complete or Pending is greater than one.

 

sunny_talwar

May be this

Count(DISTINCT {<ID = {"=Count({<Status = {'Running'}>} Status) > 1 or Count({<Status = {'Complete'}>} Status) > 1 or Count({<Status = {'Pending'}>} Status) > 1"}, Status = {'Running', 'Complete', 'Pending'}>} ID)