Follow these steps to create the KPI:
- Create a new item; select Analytics from the left-hand list and Key Performance Indicator from the right.
- Set the Name field to ConWHSVehicleServiceThisMonth and press Add.
- Drag the ConWHSVehicleServiceMeasure aggregate measure from the project onto the KPI. This sets the Measurement property for us.
- Complete the remaining properties, as follows:
Property |
Value |
Label |
Service orders |
Bad Threshold |
20 |
Good Threshold |
1 |
Scoring Pattern |
LessIsBetter |
Menu Item Name |
Must leave this blank |
- On the Value node, set the properties as follows:
Property |
Value |
Measure Group |
ServiceInformation |
Measure |
ServiceRecords |
- Expand the Value node, and add a new range to the Ranges node and configure the properties, as shown here:
Property |
Value |
Dimension |
ServiceDate |
Attribute |
Month |
Name |
MonthRange |
- We can now add trends. Under the Trend node, create a new trend and set the properties as shown here:
Property |
Value |
Dimension |
ServiceDate |
Attribute |
Week |
Name |
WeeklyTrend |
Item Count |
10, this means 10 weeks in this case |
Label |
Weekly trend |
- Now, we should create the top trend, which shows the top n contributory factors to the value. Complete the new trend as follows:
Property |
Value |
Trend Type |
TopTrend |
Dimension |
ConWHSVehicles |
Attribute |
VehicleGroupDescription |
Name |
TopTrend |
Label |
Vehicle groups |
Item Count |
5, this means the top 5 vehicle groups |
- Finally, let's add a bottom trend, which is done as follows:
Property |
Value |
Trend Type |
BottomTrend |
Dimension |
ConWHSVehicles |
Attribute |
VehicleGroupDescription |
Name |
BottomTrend |
Label |
Vehicle groups |
Item Count |
5, this means the bottom 5 vehicle groups |
- You can create multiple trends of each type, and they will appear as options to the user. Try and create a top trend for vehicle types.
- Save and close the designer.
To test our KPI we should create a tile for the KPI so we can add it to a workspace. This is done by the following steps:
- Create a new tile called ConWHSVehicleServiceThisMonthTile.
- Drag the ConWHSVehicleServiceThisMonth KPI onto the tile in the designer. This sets the Type property to KPI and the KPI property to ConWHSVehicleServiceThisMonth.
- Set Label to Vehicle service orders and the Size property to Wide.
- Save and close the designer.
Add the tile to the vehicle management workspace form:
- We will need to add this to a workspace. Locate the ConWHSVehicleWorkspace form in Application Explorer.
- Right-click on the form and choose Create extension.
- Change the suffix so that it is named ConWHSVehicleWorkspace.ConAnalytics.
- Open the form in the designer.
- Right-click on the PanoramaSectionTiles tab page and choose New | Tile Button.
- Set the Name and Tile properties to ConWHSVehicleServiceThisMonthTile.
Build the project and synchronize the database:
- Right-click on the project and choose Properties.
- Change Synchronize Database on Build to True.
- Press OK.
- Build the project.
To test the KPI, follow these steps:
- Open the Operations client; in our case, we can just open the following URL:
https://usnconeboxax1aos.cloud.onebox.dynamics.com/?cmp=usmf&mi=ConWHSVehicleWorkspace
- If you receive an error that the KPI does not exist, rebuild the project with the Synchronize Database on Build project property set to True.
- The KPI will display with no data; to set this up, navigate to System administration | Setup | Data cache | Data cache parameters.
- Select the Cache refresh tab page.
- If you have a batch group set up for system jobs, enter this in the Batch group field; otherwise, leave it blank.
- Click on Initialize batch job.
- Open System administration | Inquiries | Batch jobs.
- The batch job, Data cache refresh batch, will be in the list and will remain executing. This may seem unusual for batch jobs, as they normally have a recurrence; however, this job runs continuously.
- If the batch job is not executing, ensure that the Microsoft Dynamics 365 for Operations Batch Management Service windows service is running.
- Wait around a minute for the data to process and test the workspace again.
Testing the workspace:
- First, you should create some test data so we can test if our KPI works correctly. We will probably need around 30 orders for multiple vehicle types and groups.
- The KPI tile contains a concise summary of the KPI and will resemble the following screenshot:
- If you click on the tile, you are taken to the KPI view.
- In this view, the user can change the defaults we supplied in the KPI, change the trend views, and apply different filters to those supplied. The view should look like the following screenshot: