Skip to main content

Is there a syntax in PQL that is equivalent to Groupby~Having in SQL?

What's the use case/formula you're trying to write? I believe certain functions have GROUP BY or parameters like it in order to work, but if you could explain further what you're trying to accomplish, might be easier to find an answer that way


What's the use case/formula you're trying to write? I believe certain functions have GROUP BY or parameters like it in order to work, but if you could explain further what you're trying to accomplish, might be easier to find an answer that way

@matt.witty13 Thank you for your reply.I'd like to create table.

 

Added a column (A-B FLAG) PQL to the OLAP table on the dashboard that determines A and B. (Not on the data table.)

I want to create a pie chart on the Celonis dashboard that counts A and B and the number of each.

In that case, what formula should I add for KPI and Dimension, respectively?

 

Now

Dimention: CASE WHEN COUNT("table"."Colomn")= COUNT (DISTINCT "table"."Colomn") THEN 'A' ELSE 'B' END 

KPI: COUNT_TABLE("") but may be wrong

 

 


If I'm understanding you correctly...

 

One way you can do it is:

 

SUM(

CASE

WHEN Ncondition that makes A]

THEN 1.0

ELSE 0.0

END)

 

And that'll give you a count of A's. Same could be done for what makes B.

 

If you're building a pie chart, you'd likely have to build multiple of these with a single dimension. I'd elect to build something outside a pie chart, but if that's what is expected, then yes you'd have to build out a single dimension with several of the count KPIs


Reply