system.kanoa.cmms.getMaintenanceKPIByType(startDate, endDate)
Returns a maintenance KPI summary grouped by maintenance type (e.g. preventive, corrective, predictive) for a given date range. Each row aggregates key maintenance metrics for a single maintenance type, letting supervisors compare volume and performance across categories of work. It is typically used to populate a breakdown chart or table on a maintenance analytics dashboard, such as a preventive-vs-corrective split.
Parameters
startDate DateTime: Start date
endDate DateTime: End date
Returns
kpiByType pyDataset
Example
# Compare maintenance KPIs across maintenance types for the current quarter
startDate = system.date.getDate(2026, 4, 1)
endDate = system.date.now()
data = system.kanoa.utilities.convertDatasetToJSON(system.kanoa.cmms.getMaintenanceKPIByType(startDate, endDate))
for i, row in enumerate(data):
print 'Row %i'%i
for k,v in row.items():
print k,v
break #Just limiting to returning the columns from the first record for display purposes
>>>
Row 0
MTTA_Minutes 0.5
ScheduleCompliancePct 0.0
workOrderCount 43
MeanWait_Minutes 0.16
completedCount 4
cancelledCount 2
maintenanceSubTypeName None
MTTR_Minutes 12.5
maintenanceTypeName Corrective
>>>