logo
search
Others

How to Count Tickets and Calculate SLA Percentages in Power BI

Tauseeq MagsiTauseeq Magsi Oct 10, 2026 870 views

Question details

The user wants to group support tickets by Priority, count the total number of tickets, and calculate the percentage of tickets that met the SLA (marked as 'No' under SLA Breached) in a Power BI table visual.

How to Count Tickets and Calculate SLA Percentages in Power BI
Product
Microsoft Power BI
Device & OS
not provided
Scenario
Creating helpdesk or IT service management reports to analyze SLA compliance rates.
Observed behavior
Calculating the total rows and conditional percentage using DAX and displaying the aggregated metrics in a table visualization.
Before you start

Ensure your Power BI data model includes a table with distinct 'Priority' and 'SLA Breached' columns, and verify that the 'SLA Breached' values are consistently formatted (e.g., exactly 'Yes' and 'No').

Solution 1Recommended

Use DAX Measures to Count Tickets and Determine SLA Compliance

Creating custom DAX measures is the most dynamic way to calculate ticket totals and conditional percentages for your Power BI visuals.

By using the COUNTROWS and DIVIDE functions combined with CALCULATE, you can dynamically filter data to find the exact percentage of tickets that did not breach the SLA. This allows the metrics to recalculate automatically if you add date or department slicers.

1
Create a Total Tickets Measure

Navigate to the Data pane, right-click your 'Tickets' table, and select 'New measure'. Enter the formula: Tickets = COUNTROWS('Tickets') to count the total volume of tickets.

2
Create the SLA Compliance Measure

Create another new measure for the percentage. Enter the formula: SLA Compliance % = DIVIDE(CALCULATE(COUNTROWS('Tickets'), 'Tickets'[SLA Breached] = "No"), COUNTROWS('Tickets')).

3
Format as Percentage

Select your new 'SLA Compliance %' measure in the Data pane. Open the 'Measure tools' tab on the top ribbon and click the '%' icon to format the decimal value as a percentage.

4
Build the Table Visual

Drag a 'Table' or 'Matrix' visual onto your report canvas. Add your 'Priority' column, followed by the 'Tickets' measure and the 'SLA Compliance %' measure to the Columns well to complete the grouping.

Use DAX Measures to Count Tickets and Determine SLA Compliance
Data Model Names: Make sure to replace 'Tickets', 'Priority', and 'SLA Breached' in the DAX formulas with the exact table and column names used in your specific Power BI data model.
Free Microsoft Office alternative

Analyze Support Data with WPS Office

While Power BI is excellent for complex enterprise dashboards, many ticket analysis and SLA calculation tasks can be done quickly and easily using spreadsheets. WPS Office offers a lightweight, highly compatible alternative to Microsoft Office for all your data reporting needs, allowing you to build pivot tables and charts without writing DAX code.

100% compatible with Microsoft Excel formats (.xlsx, .xls, .csv)Create powerful PivotTables for instant ticket grouping and SLA countingFree to use with a familiar, easy-to-navigate interface for quick adoptionBuilt-in advanced formulas like COUNTIFS to calculate compliance percentages instantly
QA img-9

Frequently Asked Questions

What is the best DAX function to count rows in a Power BI table?

The COUNTROWS function is highly recommended over COUNT because it counts every row in the specified table, even if some columns contain blank values. This ensures an accurate total ticket count regardless of missing data.

Why is my SLA Compliance percentage showing as a blank or returning an error?

This usually happens if the denominator in your calculation is zero or if there are spelling mismatches (e.g., your data contains 'False' instead of 'No' for SLA Breached). Using the DIVIDE function safely handles divide-by-zero errors by returning a blank rather than breaking your visual.

Can I filter the SLA compliance metric by date range?

Yes. Because you built the SLA calculation using DAX measures, you can safely add a Date slicer to your Power BI report canvas. The CALCULATE and COUNTROWS functions will automatically adapt and recalculate based on the filtered date range.