Skip to main content

Dear Experts , I have peculiar requirement which i might be making more complicated. Here is the requirement.

Lets say X is the document that gets posted every day and Some documents are with "Y" status and some are not . Requirement is to calculate Percentage of document posted each "Month" with Y status . So KPI should look like

 

Jan 2023 - percentage of x document posted with y status in Jan are 10%

Feb 2023 - percentage of x document posted with Y status in Feb are 23%

 

My challenge is how to ensure in PQL query that in this formula given below i am only using Total document in "Given Month"

 

Formula = X document with y status / total docs posted in "Given Month" .

 

Any guidance / keyword / help is requested.

Hi,

You can try using case when statement.

Formula=

count(CASE WHEN

(date>='2023-01-01' and date<='2023-01-31')

and document='X' and status='Y' then

_case_key)

/

count(CASE WHEN

(date>='2023-01-01' and date<='2023-01-31')

and document='X' then

_case_key)

 

To make it more dynamic you can replace the dates with variables and use a button dropdown to write values for each month to the variables.

 

Hope this helps!:)

 

Thanks,

Divya


Reply