Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Shabnam123
Contributor II
Contributor II

Expression not giving correct output.

I am supposed to determine how many processes are failing based on the last start time of the process. I am trying to group by start timings based on process id and select the status of the last start timing. But query is giving wrong value as output. 
Count(distinct
{<process_status={'Failed'}>}
process_id *
{<process_strt_tm={"=Max(Aggr(NODISTINCT process_strt_tm, process_id))"}>} process_id)

Labels (2)
2 Replies
TauseefKhan
Creator III
Creator III

Hi @Shabnam123,

Check this:

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

Shabnam123
Contributor II
Contributor II
Author

Nope. This brings everything to 0.