Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Shabnam123
Contributor II
Contributor II

Query error

 

I need to count process_id based on condition

 


Count(
DISTINCT 
If(
Aggr(NODISTINCT Max(process_strt_tm), process_id) = process_strt_tm
AND process_status = 'Completed' , 
process_id
)

 

But before this, I need to add an extra condition that catalog_type='xyz' 
How to do this?

Labels (2)
1 Solution

Accepted Solutions
TauseefKhan
Creator III
Creator III

Count(
DISTINCT
If(
Aggr(NODISTINCT Max({<catalog_type={'xyzzy'}>} process_strt_tm), process_id) = process_strt_tm
AND process_status = 'Completed',
process_id
)
)

View solution in original post

3 Replies
TauseefKhan
Creator III
Creator III

Check This :

Count(
DISTINCT
If(
Aggr(NODISTINCT Max(process_strt_tm), process_id) = process_strt_tm
AND process_status = 'Completed'
AND catalog_type = 'xyzzy',
process_id
)
)

Shabnam123
Contributor II
Contributor II
Author

No. I need to choose catalog_type first and then apply rest of condition

TauseefKhan
Creator III
Creator III

Count(
DISTINCT
If(
Aggr(NODISTINCT Max({<catalog_type={'xyzzy'}>} process_strt_tm), process_id) = process_strt_tm
AND process_status = 'Completed',
process_id
)
)