Limit keyword in pql statement

Hello All,

Please is it possible to use the LIMIT or TOP X keyword in a PQL statement.

Hi,

you could limit the output of a PQL statement using the INDEX_ORDER function (read more on https://help.celonis.cloud/help/display/CIBC/INDEX_ORDER) With this function you can numerate the results of a statement and therefore also limit the output to a specific number of results.

Best regards,
Viana

Thank you. I will take a look at the function.

Hi kalversberg,
So I as able to rank the spend column using the INDEX_Order function. I am unable to limit it to say 10 outputs. How can I achieve this.

INDEX_ORDER(PU_SUM(“purchase_orders”,“purchase_order_lines”.“reporting-total”))

Hi,

you can use the formula as a component filter:
FILTER INDEX_ORDER(PU_SUM(“purchase_orders”,“purchase_order_lines”.“reporting-total”)) <= 10

Best,
Viana

Great. Thank you for your prompt feedback