Skip to main content
Question

Limit keyword in pql statement

  • August 10, 2020
  • 5 replies
  • 4 views

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

5 replies

  • Level 0
  • 132 replies
  • August 11, 2020

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


  • Author
  • Level 1
  • 3 replies
  • August 11, 2020
Thank you. I will take a look at the function.

  • Author
  • Level 1
  • 3 replies
  • August 13, 2020

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))


  • Level 0
  • 132 replies
  • August 13, 2020

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


  • Author
  • Level 1
  • 3 replies
  • August 13, 2020
Great. Thank you for your prompt feedback