How to do it...

First, we will need to create a view that flattens the service data into one view. To do this, follow these steps:

  1. Create a new view called ConWHSVehicleServiceExpanded.
  2. Add the ConWHSVehicleSErviceTable table as the root data source and ConWHSVehicleServiceLine as a child data source, as shown in the following screenshot:
  1. Either set Use Relations property on the ConWHSVehicleServiceLine data source, or add a relation manually.
  2. Add all non-system fields from the ConWHSVehicleServiceTable table, and the ItemId field from ConWHSVehicleServiceLine.
  3. Save and close the view.

We can now create the aggregate measure, which is ...

Get Extending Microsoft Dynamics 365 for Operations Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.