Convert To Integer

Overview

The Convert To Integer enrichment transforms decimal numbers (double or single precision floating-point values) into whole numbers (32-bit integers) by applying a specified rounding method. This enrichment is essential for process mining scenarios where you need to standardize numeric data, perform integer-based calculations, or prepare data for systems that require whole number values.

In process mining, many calculated metrics like durations, costs, or counts may result in decimal values that need to be converted to integers for reporting, categorization, or downstream processing. This enrichment ensures consistent and predictable conversion behavior by letting you choose between different rounding strategies, making it particularly valuable when precision requirements and business rules dictate how fractional values should be handled.

The enrichment works with both case-level and event-level attributes, automatically detecting the source and applying the conversion appropriately. It creates a new attribute while preserving the original decimal value, allowing you to maintain data lineage and compare pre- and post-conversion values when needed.

Common Uses

  • Convert calculated duration values from decimal hours or days to whole numbers for simplified reporting and categorization
  • Round financial amounts to nearest dollar or currency unit when cent-level precision is not needed for analysis
  • Transform calculated performance metrics like throughput rates or cycle times into integer values for dashboard displays
  • Prepare numeric data for systems that require integer inputs, such as priority levels or status codes
  • Standardize count-based metrics that may have been calculated as averages or weighted values
  • Convert percentage calculations to whole numbers for simplified business rules and filtering
  • Transform calculated resource utilization rates into integer percentages for capacity planning reports

Settings

New Attribute Name: The name of the new integer attribute that will be created to store the converted values. This attribute will be added as a case or event attribute depending on the source of the original attribute. Choose a descriptive name that clearly indicates the attribute contains integer values (for example, "Duration Days" or "Amount Dollars"). The new attribute will be displayed with number formatting in the mindzieStudio interface.

Attribute Name: The source attribute containing decimal values (double or single precision floating-point numbers) that you want to convert to integers. The dropdown shows only numeric attributes with decimal places from your dataset. This can be either a case attribute or an event attribute. The enrichment automatically detects whether the source is case-level or event-level data and creates the new attribute at the same level.

Rounding Method: Determines how decimal values are rounded when converting to integers. This setting is critical for ensuring the conversion meets your business requirements. Two methods are available:

  • AwayFromZero (default): Rounds to the nearest integer, with midpoint values (exactly .5) rounding away from zero. For example: 2.5 becomes 3, -2.5 becomes -3, 2.4 becomes 2, 2.6 becomes 3. This is the most commonly used rounding method and matches standard mathematical rounding conventions. Use this method when you want symmetric rounding behavior for positive and negative numbers.

  • ToZero: Rounds to the nearest integer, with midpoint values (exactly .5) rounding toward zero. For example: 2.5 becomes 2, -2.5 becomes -2, 2.4 becomes 2, 2.6 becomes 3. This method is also known as "banker's rounding" or "round half down" and is useful when you want to avoid systematic bias in rounding over large datasets. Use this method when conservative estimates are preferred or when regulatory requirements dictate this specific rounding behavior.

Examples

Example 1: Purchase Order Processing - Duration Rounding

Scenario: A procurement team tracks purchase order cycle times in decimal days but needs whole day values for SLA reporting and process categorization. Purchase orders with cycle times like 3.7 days or 5.2 days need to be rounded to 4 and 5 days respectively for clear communication with stakeholders and simplified performance dashboards.

Settings:

  • New Attribute Name: PO Cycle Time Days
  • Attribute Name: PO Cycle Time (calculated decimal duration)
  • Rounding Method: AwayFromZero

Output: The enrichment creates a new case attribute "PO Cycle Time Days" containing integer values. Cases with original values like 3.2 days become 3 days, 3.5 days becomes 4 days, and 3.8 days becomes 4 days. The attribute appears in the case table with number formatting and can be used directly in filters, performance categorizations, and dashboard visualizations.

Case ID PO Cycle Time PO Cycle Time Days
PO-1001 3.2 3
PO-1002 3.5 4
PO-1003 3.8 4
PO-1004 5.1 5
PO-1005 7.9 8

Insights: The integer values enable simplified SLA tracking (e.g., "orders completed within 5 days") and make it easier to create meaningful duration categories without dealing with decimal precision in business rules.

Example 2: Healthcare - Patient Cost Standardization

Scenario: A hospital analyzes patient treatment costs that include cents in the calculations, but the finance department requires whole dollar amounts for budget reporting and variance analysis. Costs like $1,247.83 or $892.45 need to be rounded to $1,248 and $892 for simplified financial reporting and cost category assignments.

Settings:

  • New Attribute Name: Treatment Cost Dollars
  • Attribute Name: Total Treatment Cost
  • Rounding Method: AwayFromZero

Output: The enrichment creates "Treatment Cost Dollars" as a new case attribute with integer values representing the nearest whole dollar amount. This attribute can be used in financial dashboards, cost categorization enrichments, and budget variance calculations without dealing with decimal precision.

Patient ID Total Treatment Cost Treatment Cost Dollars
PT-5001 1247.83 1248
PT-5002 892.45 892
PT-5003 3456.50 3457
PT-5004 567.12 567
PT-5005 2199.99 2200

Insights: Converting to integer dollar amounts simplifies financial reporting, makes cost categorization more straightforward, and aligns with how budget managers think about and discuss treatment costs in stakeholder meetings.

Example 3: Manufacturing - Production Throughput Metrics

Scenario: A manufacturing plant calculates average production throughput rates that result in decimal values like 47.3 units per hour. For capacity planning reports and shift performance dashboards, operations managers prefer whole number values that are easier to communicate and understand at a glance.

Settings:

  • New Attribute Name: Units Per Hour
  • Attribute Name: Calculated Throughput Rate
  • Rounding Method: AwayFromZero

Output: Creates an integer attribute "Units Per Hour" that rounds throughput rates to whole numbers. Production rates like 47.3, 47.5, and 47.8 become 47, 48, and 48 respectively, making it easier to set production targets and evaluate shift performance.

Shift ID Calculated Throughput Rate Units Per Hour
SHIFT-101 47.3 47
SHIFT-102 47.5 48
SHIFT-103 47.8 48
SHIFT-104 52.1 52
SHIFT-105 49.9 50

Insights: Whole number throughput values make it easier to communicate production targets, compare shift performance, and identify capacity constraints without the distraction of decimal precision that adds no value to operational decision-making.

Example 4: Order Fulfillment - Time to Ship Hours

Scenario: An e-commerce company tracks time from order placement to shipment in decimal hours (e.g., 18.7 hours, 23.4 hours) but wants to report these values as whole hours for customer service SLA tracking and fulfillment center performance evaluation. Simplified integer values make it easier to categorize orders as "same day," "next day," or "2+ days."

Settings:

  • New Attribute Name: Shipping Time Hours
  • Attribute Name: Time To Ship (decimal hours)
  • Rounding Method: AwayFromZero

Output: The enrichment produces an integer attribute "Shipping Time Hours" with values rounded to whole hours. Orders with shipping times of 18.3, 18.5, and 18.8 hours become 18, 19, and 19 hours respectively, enabling straightforward categorization and SLA compliance tracking.

Order ID Time To Ship Shipping Time Hours
ORD-2001 18.3 18
ORD-2002 18.5 19
ORD-2003 18.8 19
ORD-2004 23.4 23
ORD-2005 47.9 48

Insights: Integer hour values enable simple rules like "orders under 24 hours" for same-day fulfillment analysis and make performance dashboards more readable for operations teams monitoring real-time fulfillment metrics.

Example 5: Financial Services - Loan Processing with Conservative Rounding

Scenario: A bank calculates loan processing cycle times in decimal business days and needs to report these to regulators using conservative estimates. When a loan takes 5.5 days to process, regulatory reporting requires rounding down to 5 days to avoid overstating processing times. This requires the ToZero rounding method to ensure midpoint values are rounded conservatively.

Settings:

  • New Attribute Name: Processing Days Regulatory
  • Attribute Name: Loan Processing Time Days
  • Rounding Method: ToZero

Output: Creates an integer attribute "Processing Days Regulatory" using conservative rounding. Values like 5.4, 5.5, and 5.6 days become 5, 5, and 6 days respectively. The ToZero method ensures that midpoint values (5.5) round down rather than up, providing conservative estimates for regulatory reporting.

Loan ID Loan Processing Time Days Processing Days Regulatory
LN-7001 5.4 5
LN-7002 5.5 5
LN-7003 5.6 6
LN-7004 7.3 7
LN-7005 7.5 7

Insights: Using ToZero rounding ensures compliance with regulatory requirements for conservative time reporting, prevents systematic overstatement of processing times in aggregate reports, and provides defensible metrics for regulatory audits.

Output

The Convert To Integer enrichment creates a single new attribute containing integer (32-bit whole number) values derived from the source decimal attribute:

New Integer Attribute: Added at the same level as the source attribute (case-level or event-level). The attribute name is specified in the "New Attribute Name" setting. The data type is Int32 (32-bit integer), supporting values from -2,147,483,648 to 2,147,483,647. The attribute is marked as a derived attribute with lineage tracking to the source decimal attribute.

Display Formatting: The new attribute is automatically configured with number display formatting in mindzieStudio, showing values without decimal places. This ensures consistent presentation in case tables, dashboards, and reports.

Null Value Handling: If the source attribute contains null values, those cases or events are skipped during conversion, and the new attribute remains null for those records. This preserves data integrity and ensures that missing data in the source does not result in zero values in the output.

Data Precision: The conversion uses standard .NET rounding with the specified MidpointRounding method, ensuring consistent and predictable behavior. The resulting integer values may lose precision compared to the original decimal values, so it's important to choose appropriate rounding methods based on your business requirements.

Integration with Other Enrichments: The new integer attribute can be used immediately in subsequent enrichments such as:

  • Categorize Attribute Values to create duration bands or cost tiers based on integer values
  • Filter Log to isolate cases based on integer threshold criteria
  • Calculators for further arithmetic operations that benefit from integer precision
  • Performance Categorization to group cases by integer-based performance metrics

The original decimal attribute is preserved unchanged, allowing you to maintain both representations of the data. This is valuable for auditing, validation, and scenarios where you need to compare the impact of rounding on your analysis results.


This documentation is part of the mindzie Studio process mining platform.

An error has occurred. This application may no longer respond until reloaded. Reload ??