Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
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
)
)