Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to count the number of times a process ran, completed nd was successful based on the process status. Now a process has multiple jobs within it, so in the table, process_start_timestamp and process_status has similar values for multiple columns. I want to do a group by (aggressive) function and select the process_status group by process_start_timestamp so that process_status is counted once per process_timestamp. how to achieve that?
This expression is giving wrong answer:
Count(
If(
Aggr(process_strt_timestamp, process_status) = process_strt_timestamp,
process_status
)
)
Hi @Shabnam123,
Dimension: Set the dimension to process_status.
Measure: Use the following measure.
Count(Distinct Aggr(process_strt_tm, process_id, process_strt_tm, process_status))
Hi, for better understandding it would be nice if you can add some sample data that is similar to your case.
So far I can tell you that aggr will return many differnt values, and you can't compare many to one, maybe you only need to include the if inside the aggr, and make the aggr to iterate by both fields
Count(Aggr(
If(process_status=process_strt_timestamp,process_strt_timestamp)
,process_status,process_strt_timestamp))
I just want to select 1 process status per process_strt_tm. Basically perform perform group by function on process_start_tm. how to do that?
Want to plot a bar graph on process status/9Running, Completed, Failed). What to add in dimension and measure?
process_id | process_strt_tm | process_end_tm | process_status |
1 | 12/01/24 5:30 | 12/01/24 7:30 | Failed |
1 | 12/01/24 5:30 | 12/01/24 7:30 | Failed |
1 | 12/01/24 5:30 | 12/01/24 7:30 | Failed |
1 | 14/01/24 6:30 | 14/01/24 7:30 | Completed |
1 | 14/01/24 6:30 | 14/01/24 7:30 | Completed |
2 | 12/01/24 5:30 | 12/01/24 7:30 | Completed |
2 | 12/01/24 5:30 | 12/01/24 7:30 | Completed |
This data without any filter should display 2 bars of length completed=2 and Failed=1. Please help.
Hi @Shabnam123,
Dimension: Set the dimension to process_status.
Measure: Use the following measure.
Count(Distinct Aggr(process_strt_tm, process_id, process_strt_tm, process_status))