Hi all,
I am analysing the approval process of various documents in a single system.
As the approval processes differs a lot depending on what document is, I would like to know for every single type of document, what % of cases have been regarded as the most common variant. I have read the Cloud Help documentation and came up with the PQL below but still the results differs from what I looked up individually in Variant Explorer, would you please advise what could have gone wrong in the PQL? Thanks a lot!
AVG(PU_COUNT (
DOMAIN_TABLE ( "Table"."Document" ) ,
"Table"."Document ID" ,
INDEX_ORDER (
PU_COUNT (
DOMAIN_TABLE ( VARIANT ( "Table"."Action Name" ) , "Table"."Document" ) ,
"Table"."Document ID"
) ,
ORDER BY (
PU_COUNT (
DOMAIN_TABLE ( VARIANT ( "Table"."Action name" ) , "Table"."Document" ) ,
"Table"."Document ID"
) DESC
) ,
PARTITION BY (
PU_FIRST (
DOMAIN_TABLE ( VARIANT ( "Table"."Action Name" ) , "Table"."Document" ) ,
"Table"."Document"
)
)
)
=
1
)
/
PU_COUNT ( DOMAIN_TABLE ( "Table"."Document" ) , "Table"."Document ID" ))