A Query-based PI is one which uses a Query as its collection source, whereas another PI would be collecting manually, or from another collection. Note that Query-based PIs need to be set up and edited in Browser.
This guide shows how to calculate what percentage of a number of items have been completed, using Actions as an example.
Scenario
There are a list of Actions that you want to be completed by a certain date. They may be critical for a big project getting submitted on time, or they could represent your Users’ Appraisal items. You know that they will all need to be completed, but you’re having trouble tracking which Actions are completed. This can be done using Query-based Performance Indicators.
Setup
Using Query-based PIs, you’re able to calculate what percentage of a list of Actions are at Completed status, using two Query-based PIs (and two queries to drive them), and one Formula-driven PI, as follows:
- Query PI 1: finds the uncompleted Actions
- Query PI 2: finds the total of these Actions
- Formula PI: calculates percentage of completed using the above PIs.
Let’s say you’ve sorted all of your Actions by Category (we’ll call it ActionsList). This gives them a single unifying property that makes querying this list of Actions simple.
Building the Queries
The first Query we want is the List of Uncompleted Actions in ActionsList. This will use two filters:
- Actions by Category (adding ActionsList here)
- Actions by Status (adding all Statuses EXCEPT Cancelled and Completed)
The Second Query we want will be the List of All Actions in ActionsList, which will only use the Actions by Category filter.
- Actions by Category (adding ActionsList here)
The PIs
For this example, a PI will be set up for each Query we’ve built, and one more for the Formula, totalling three PIs.
To set up a PI to use Query results, navigate to the Collection Settings tab, and set the Source to Query. This will cause a button labelled ‘Change’ to appear below. You’ll need to select this button, and choose one of the Queries that we just created from the list that appears. For this example, the three PIs are named as follows:
- PI.UCAL: The PI using the List of Uncompleted Actions in ActionsList Query as its source
- PI.AAL: The PI using the List of All Actions in ActionsList Query as its source
- PI.PAL: The PI that will use the formula below to calculate the percentage of Actions that are at Completed status.
Make sure these PIs all have the same Start Date, which is set through the PI Settings tab.
To set up the Formula PI, navigate to the Formula tab, and enter the formula as written below.
("PI.UCAL” / “PI.AAL”) * 100
Once the formula is added, jump to the Collection Settings tab, and set the Source to Formula.
That’s it! Once this is all set up, the Query PIs will automatically collect the source data when they become due for update, and the Formula will automatically collect the data from the Query PIs.
Don't forget that Targets aren't automatically calculated by the PI, so you'll need to set these up yourself.
Article Comments
0 comments