Analysis / Digital Health · September 6, 2024

two gray pencils on yellow surface

Process Mining Using Power BI

Power BI is a versatile business analytics tool that can be used for process mining when combined with event logs and process mapping techniques. This guide will walk you through how to perform process mining in Power BI step by step, from preparing your data to visualising process flows and identifying inefficiencies.

Step 1: Collect and Prepare Event Log Data

The first step in process mining is gathering the event log data from your systems. Event logs typically come from enterprise systems such as ERP (e.g., SAP, Oracle) or CRM systems, which track key activities in your business process.

A typical event log should contain at least the following columns:

  • Case ID: Identifies the unique instance of the process (e.g., an order number or procurement ID).
  • Activity: Describes the activity or event that took place (e.g., “Create Purchase Order,” “Approve Invoice”).
  • Timestamp: Records when each activity was performed.
  • Resource: (Optional) Identifies who or what performed the activity (e.g., department, system user).

For example:

Case IDActivityTimestampResource
PO001Create Purchase Order2024-01-01 09:00:00User1
PO001Approve Purchase Order2024-01-01 10:00:00Manager1
PO002Create Purchase Order2024-01-01 09:30:00User2
PO001Send to Supplier2024-01-01 11:00:00AutomatedSystem

This event log can be stored in an Excel file, CSV, or directly loaded from a database that Power BI can connect to.

Step 2: Import Event Log Data into Power BI

  1. Open Power BI Desktop.
  2. Click on Home > Get Data and choose your data source (Excel, CSV, database, etc.).
  3. Load the event log into Power BI by selecting the relevant columns (Case ID, Activity, Timestamp, etc.).
  4. Transform the data if needed by using the Power Query Editor. For instance, you may need to:
    • Convert timestamps into proper datetime formats.
    • Sort the activities by their occurrence.

Step 3: Create Process Flow Measures

To create a process flow, you will need to generate a sequence for each Case ID that reflects the order in which activities were completed. You can do this using DAX (Data Analysis Expressions) in Power BI.

  1. Create a custom column for sorting:

    • Go to the Data view and create a new column that represents the order of activities for each case.
    • Use the DAX expression:
ActivityOrder = RANKX(FILTER(EventLog, EventLog[Case ID] = EARLIER(EventLog[Case ID])), EventLog[Timestamp], , ASC)

This will rank the activities for each case based on their timestamp, allowing you to visualise the process in the correct order.

Calculate the process duration:

  • You can also calculate the time taken for each activity or between certain stages using another DAX formula.
ActivityDuration = DATEDIFF( MIN(EventLog[Timestamp]), MAX(EventLog[Timestamp]), HOUR )

  1. This will give you insights into how long it takes for different cases to complete the entire process.

Step 4: Visualise the Process Flow

Next, you need to visualise the flow of activities for each process. While Power BI does not have built-in process mining tools, you can leverage custom visuals to achieve this.

  1. Create a Process Flow Diagram:
    • Use a Sankey chart or Flow Map to visualise the flow of activities between stages.
    • Go to the Visualizations pane and click on Get More Visuals to download a custom Sankey Chart visual from the Power BI Marketplace.
    • Drag and drop the Activity field into the Source and Target fields to show the transitions between activities.
  2. Configure the Sankey chart:
    • Set the Case ID as the Category to visualise how each process instance (e.g., each purchase order) flows from one activity to another.
    • Use different colours for each transition to easily distinguish between activities.
  3. Create a Time-Based Analysis:
    • Use a line chart or scatter plot to track the duration of activities over time. This helps identify bottlenecks in your processes.
    • Place the Case ID on the x-axis and the Activity Duration on the y-axis to visualise how long each case takes to complete.

Step 5: Analyse and Filter Results

After setting up the visuals, you can start analysing your process flows in detail:

  1. Identify Bottlenecks: Use the process flow diagram to pinpoint where delays occur. If a specific activity consistently takes longer than expected, it may indicate a bottleneck in your process.
  2. Investigate Process Variants: Filter the data by specific cases, resources, or timeframes to compare how different cases flow through the system. This can highlight deviations from the ideal process model.
  3. Check for Compliance: In procurement, it is essential to ensure that processes adhere to regulatory requirements. You can add filters to check if all required activities, such as approvals, are completed before moving to the next stage.

Step 6: Create Interactive Dashboards

One of Power BI’s strengths is its ability to create interactive dashboards that allow stakeholders to explore the data dynamically. Once you have set up the process mining visuals:

  1. Add slicers and filters to allow users to drill down into specific process variants, departments, or time periods.
  2. Customise the reports by adding labels, titles, and tooltips for better insights.
  3. Publish the report to Power BI Service, where team members can interact with the report and gain insights into the process.

Step 7: Monitor and Optimise Processes

Process mining is an ongoing activity, so it’s essential to continuously monitor your processes and refine your workflows based on insights. In Power BI:

  1. Set up scheduled data refreshes to automatically update the event logs and process flow diagrams with the latest data.
  2. Track KPIs such as time spent in each activity or the frequency of deviations from the ideal process.
  3. Use Power BI’s alerts and notifications to monitor key metrics and be alerted when performance thresholds are met or missed.

Process mining using Power BI offers immense potential for organisations looking to improve transparency, efficiency, and compliance within their procurement and supply chain operations. Although Power BI is not a traditional process mining tool, its flexibility, powerful visualisation capabilities, and ability to handle large datasets make it an excellent choice for those looking to delve deeper into their operational processes. By following the steps outlined, businesses can unlock critical insights, leading to optimised processes, reduced costs, and improved decision-making.

One of the most significant advantages of using Power BI for process mining is its accessibility. Power BI is widely available and integrated with many enterprise systems, making it easier for organisations to adopt and start using process mining techniques without requiring additional software investments. This allows teams that are already familiar with Power BI to quickly get started with process analysis without the need for extensive training or onboarding. Moreover, the flexibility of Power BI’s data integration options—such as connecting to Excel files, databases, and cloud services—means that process data from various systems can be easily pulled together for analysis.

Another key benefit is Power BI’s visualisation capabilities. The customisable nature of Power BI dashboards allows users to create a wide variety of charts and visual representations, making it easy to communicate process insights to stakeholders. Tools like the Sankey chart or Flow Map can visually represent the transitions between different activities within a process, providing a clear picture of how cases move through various stages. This is particularly useful in complex environments like procurement and supply chains, where processes often involve multiple steps, stakeholders, and systems. By using interactive visuals, users can drill down into specific process instances, uncover bottlenecks, and analyse performance metrics, all in an intuitive and user-friendly interface.

Beyond visualisation, Power BI’s ability to handle real-time or near-real-time data enables continuous process monitoring. For organisations dealing with high volumes of transactions or time-sensitive operations, such as NHS Trusts managing the procurement of medical supplies or retailers coordinating supply chains, the ability to monitor processes in real-time is invaluable. By setting up scheduled data refreshes, businesses can ensure that they always have the most up-to-date information about their processes, allowing them to spot inefficiencies or compliance issues as they arise, rather than retrospectively.

Power BI’s ability to integrate with other tools and systems also enhances its power as a process mining tool. For example, by integrating Power BI with ERP or SCM systems, users can automate the flow of data from operational systems into their process mining dashboards, enabling continuous monitoring and analysis without manual intervention. This seamless data integration reduces the likelihood of human error and increases the speed at which insights can be generated, leading to faster decision-making and more agile operations.

A particularly compelling aspect of using Power BI for process mining in procurement and supply chains is its role in improving compliance. In highly regulated environments like public sector procurement, where strict adherence to regulations such as the Public Contracts Regulations 2015 is necessary, process mining can help ensure that processes follow the required steps. With Power BI, users can easily compare actual process flows to ideal process models, highlighting any deviations that could indicate non-compliance. By setting up automated alerts, stakeholders can be notified when a process deviates from the expected path, allowing them to take corrective action before a minor issue escalates into a significant problem.

Process mining in Power BI also enables organisations to optimise their operations by identifying bottlenecks and inefficiencies. In a supply chain context, this could mean spotting delays in order fulfilment or inefficiencies in warehouse operations. In procurement, it might involve identifying approvals that take too long, causing delays in purchasing or missed deadlines for tenders. By using Power BI to analyse the time spent on each activity, organisations can pinpoint specific steps that are slowing down the overall process and take targeted action to address these issues. For example, automating routine tasks such as approval workflows or introducing a more efficient resource allocation strategy can significantly improve process performance.

Furthermore, Power BI allows organisations to perform advanced analyses, such as benchmarking and trend analysis. By analysing historical process data, organisations can establish benchmarks for performance and track how processes improve over time. This is particularly valuable in environments where continuous improvement is a key focus, such as Lean or Six Sigma initiatives. By regularly reviewing process performance data in Power BI, organisations can measure the impact of any process changes they have implemented, ensuring that improvements lead to tangible results.

While Power BI may not offer the depth of features found in dedicated process mining tools, such as Celonis or Disco, its ability to integrate with a wide range of systems, its powerful visualisation capabilities, and its accessibility make it an attractive option for organisations looking to get started with process mining. For many businesses, especially those that already use Power BI for other forms of reporting and analysis, leveraging the platform for process mining can be a cost-effective and straightforward way to gain valuable process insights.

In conclusion, process mining with Power BI provides organisations with the tools they need to understand and optimise their processes. By combining data analysis, visualisation, and continuous monitoring, Power BI helps organisations uncover inefficiencies, ensure compliance, and improve overall operational performance. As businesses increasingly rely on data-driven decision-making and automation, the role of tools like Power BI in process mining will continue to grow, making it an essential component of modern business strategy. With the ability to scale, customise, and adapt to a wide range of use cases, Power BI offers an accessible and effective solution for organisations aiming to enhance their process management efforts.

Here are some websites that provide resources and further understanding of process mining with Power BI:

  1. Microsoft Power BI Documentation – Dataflow and Process Mining:
    https://learn.microsoft.com/en-us/power-bi/transform-model/dataflows/dataflows-introduction
    This section of Microsoft’s official Power BI documentation provides insights on dataflows, which are essential for process mining as they allow for the ingestion, transformation, and modeling of large datasets.

  2. Celonis Process Mining:
    https://www.celonis.com/process-mining/
    Celonis is a leading process mining tool provider that integrates with Power BI. Their website offers educational resources, case studies, and best practices for combining process mining techniques with data analytics platforms like Power BI.

  3. PM4Py Documentation:
    https://pm4py.fit.fraunhofer.de/
    While PM4Py is a Python library, it offers insights into how process mining can be applied in data analytics environments. Power BI users can integrate these principles with Power BI’s visualisation capabilities.

  4. Power BI Community – Process Mining Discussions:
    https://community.powerbi.com/t5/Power-Query/Process-Mining/m-p/597390
    A forum thread within the Power BI community where users discuss approaches and experiences with process mining in Power BI, offering practical tips and solutions.

  5. Enterprise DNA Blog – Process Mining with Power BI:
    https://blog.enterprisedna.co/how-to-perform-process-mining-in-power-bi/
    This blog provides tutorials and examples of how to use Power BI for process mining, walking users through the steps to build a process flow and gain valuable insights.

These resources will help you dive deeper into integrating process mining with Power BI.