Skip to main content

Hello everyone, could you tell me if there is a formula in PQL where I can get the top 1 activities of a document?

 

Example, the Purchase Requisition, had several repetitive reworks, I would like to pick the top 1 rework.

Hi @douglas.henri,

 

The function that will help you is INDEX_ACTIVITY_TYPE (celonis.com), but you need some steps to get the result that you want.

 

  1. Use the INDEX_ACTIVITY_TYPE (celonis.com) to see for every activity how often it occurs. You can set a filter here to only use a subsection of your activities.
  2. Use the PU_FIRST function to get the first Activity per Case/Document
  • Add an 'Order By' statement, and sort the activities based on their occurrence. If you do this Descending, the most occurring will end-up on top, and is captured using the PU_FIRST statement.

 

PU_FIRST(

  CASE_TABLE()

  , ACTIVITY_COLUMN ( )

  , ORDER BY INDEX_ACTIVITY_TYPE ( ACTIVITY_COLUMN ( ) ) DESC

)


Reply