Power BI

Power BI DAX and SVG Case Study for Reliable Loan Operations

Power BI DAX and SVG Loan SLA Dashboard

Table of Contents

Case Study at a Glance

Element

Definition

Industry

Fintech consumer lending.

Users

Loan operation managers and underwriting team lead.

Decision

Which application should be escalated.

Visual

Loan Decision Service Level Agreement (SLA) Timeline, one DAX-generated SVG per table row.

Host

Native Power BI tables.

Data

Fictionalized and anonymised loans application data.

Outcome

Faster, more consistent SLA monitoring without losing applications context.

Loan Decision Service Level Agreement Monitor Dashboard

Loan Decision Service Level Agreement Monitor Dashboard

Download this report here 👉 link

The Data

This case study uses fictionalized and anonymized loan application data created specifically to demonstrate reporting solutions. The dataset represents a typical consumer lending workflow, where applications move through different processing stages and are subjected to individual decision SLAs.

The data includes the fields that are required to monitor each application’s progress against its target:

Field

Purpose

Application ID

Identify the loan application.

Product

Loan product associated with the application.

Owner

Person responsible for the application.

Submitted At

Time when application processing began.

SLA Hours

Maximum allowed processing time.

Decision At

Time when the lending decision was completed.

Current Stage

Current stage of the application.

Risk Band

Operational risk classification.

The fictional dataset deliberately includes a mixture of open, completed, on-time, late, and breached applications. This allows the visual to demonstrate different SLA conditions and make it possible to test the underlying DAX logic against realistic operational scenarios.

The Problem

The loan operation team already had the data needed to monitor SLA performance. The problem was how that information was presented.

The initial table contained separate columns for:

  • Submitted At
  • SLA Hours
  • SLA Due
  • Decision At
  • Elapsed Hours
  • Variance
  • Current Stage
  • SLA Status

Although the information was accurate, reviewers had to compare several columns to understand the position of each of the applications. For example, determining whether an application was approaching its deadline required the reviewer to mentally connect the submission time, SLA target, elapsed time, and the status.

The Specific Reporting Gap

The company needed a compact way to communicate the SLA status and urgency directly within each application row. A simple status such as At Risk or Breached could identify category, but it did not show the complete picture:

  • When did the process start?
  • Where is the SLA target?
  • Has the application been completed?
  • How much time remains?
  • How far has it exceeded its target?

The objective was therefore to turn these related values into one easy-to-scan visual signal without removing underlying application details.

Why the Native Visual Was Not Enough

The first approach was to use Power BI’s native table formatting.

Native Power BI visuals provided useful options such as:

  • Conditional formatting
  • Background and font colours
  • Data bars
  • Icons
  • Rule-based formatting

These features could communicate the individual aspects of the SLA, but they could not produce complete row-level timeline required for this use case. The desired visual needed should combine symbols, lines, positions, and text within a single table cell.

For example:

○ Submitted ───────── ◇ SLA Target ─── ● Completed

or for a breach:

○ Submitted ───────── ◇ SLA Target ─── → 24h late

A data bar could represent elapsed time, while conditional formatting could indicate the status, but neither could naturally combine start point, SLA target, current position, completion state and the variance into one visual.

Native Formatting versus The Custom Approach

Requirement

Native formatting

SVG approach

Show SLA status

✓

✓

 

Apply status colours

✓

✓

 

Show submission point

Limited

✓

 

Show SLA target

Limited

✓

 

Show current/completed position

Limited

✓

 

Distinguish open vs completed

Limited

✓

 

Show SLA overrun

Limited

✓

 

Combine lines and symbols in one cell

✗

✓

 

Keep the visual within the application row

✓

✓

 

The solution is therefore not to replace the native Power BI table, but to extend what could be displayed inside it.

The Solution: DAX-Generated SVG

The solution combines the strengths of native Power BI visuals, DAX, and SVG. A DAX measure dynamically generates a SVG timeline for each application. The resulting image is then displayed directly inside the native Power BI table. This approach keeps the familiar table structure while adding a custom visual layer that native formatting could not provide.

The table continues to handle:

  • Filtering
  • Sorting
  • Application details
  • Owner and stage information
  • Operational context

The SVG handles visual representation of the SLA timeline. This creates a hybrid solution:

Native Power BI for the structure and interaction, DAX for business logic, and SVG for custom visual encoding.

What the SLA Timeline Shows

Each application receives its own timeline based on its SLA and the elapsed processing time.

The basic structure is:

○ Submission ───────── ◇ SLA Target ───────── ● Current/Completed

Loan Decision SLA SVG

Each element has a specific meaning.

Visual element

Meaning

○ Start circle

Application submitted.

◇ Diamond

SLA target.

● Filled circle

Decision completed.

○ Hollow circle

Application still open.

Colored line

Progress toward or beyond the SLA.

→ Arrow

Actual position extends beyond the display cap.

Text label

Exact remaining or exceeded time.

The visual therefore communicates both status and magnitude rather than relying on the colour alone.

Core DAX Logic

  1. Now, add Product Name and Total Sales to a bar chart. Then drag Show Top N into the visual-level filters and set it to show items where the value is 1.

Thus, the chart will dynamically change as the user changes the Top-N slicer.

SLA Hours

SLA Hours =
SELECTEDVALUE ( Applications[SLA Hours] )

Elapsed Hours

Elapsed Hours =
VAR _Submitted =
    SELECTEDVALUE ( Applications[Submitted At] )
VAR _Decision =
    SELECTEDVALUE ( Applications[Decision At] )
VAR _AsOf =
    SELECTEDVALUE ( AsOf[AsOf Timestamp] )
VAR _End =
    COALESCE ( _Decision, _AsOf )
RETURN
    IF (
        NOT ISBLANK ( _Submitted ),
        MAX ( 0, DATEDIFF ( _Submitted, _End, MINUTE ) / 60 )
    )

SLA Variance

SLA Variance Hours =
[Elapsed Hours] – [SLA Hours]

For open applications, the elapsed time is calculated as of Timestamp, while completed applications use their actual decision timestamp. In a production implementation, the elapsed-time calculation should be adopted if an organization’s SLA excludes weekends, holidays, pauses, or non-operating hours.

Creating the SVG Visual

Loan Decision SLA SVG =
VAR _One =
    HASONEVALUE ( Applications[Application ID] )
VAR _Target = [SLA Hours]
VAR _Elapsed = [Elapsed Hours]
VAR _IsOpen =
    ISBLANK ( SELECTEDVALUE ( Applications[Decision At] ) )
VAR _Valid =
    _One && _Target > 0 && NOT ISBLANK ( _Elapsed )
VAR _Ratio =
    DIVIDE ( _Elapsed, _Target )
VAR _Status = [SLA Status]
VAR _Color =
    SWITCH (
        _Status,
        “Completed on time”, “%232F7D62”,
        “Within SLA”, “%232878BD”,
        “At risk”, “%23D98716”,
        “Completed late”, “%23C43C3C”,
        “Breached”, “%238B1E2D”,
        “%23687386”
    )
VAR _Variance = _Elapsed – _Target
VAR _Label =
    SWITCH (
        TRUE (),
        NOT _Valid, “Data issue”,
        _Variance > 0, FORMAT ( _Variance, “0” ) & “h late”,
        _Variance = 0, “Due now”,
        FORMAT ( ABS ( _Variance ), “0” ) & “h ” & IF ( _IsOpen, “left”, “early” )
    )
VAR _OriginX = 12
VAR _TargetX = 188
VAR _CapX = 252
VAR _RawActualX = _OriginX + ( _Ratio * ( _TargetX – _OriginX ) )
VAR _ActualX =
    MIN ( _CapX, MAX ( _OriginX, _RawActualX ) )
VAR _BeyondCap = _RawActualX > _CapX
VAR _Marker =
    IF (
        _BeyondCap,
        “<path d=’M 244 10 L 252 17 L 244 24′ fill=’none’ stroke='” & _Color & “‘ stroke-width=’3’/>”,
        “<circle cx='” & FORMAT ( _ActualX, “0.0” ) & “‘ cy=’17’ r=’6′ fill='”
            & IF ( _IsOpen, “white”, _Color ) & “‘ stroke='” & _Color & “‘ stroke-width=’3’/>”
    )
VAR _Overrun =
    IF (
        _Ratio > 1,
        “<line x1=’188′ y1=’17’ x2='” & FORMAT ( _ActualX, “0.0” ) & “‘ y2=’17’ stroke='” & _Color & “‘ stroke-width=’3’/>”
    )
VAR _Svg =
    “data:image/svg+xml;utf8,” & “<svg width=’330′ height=’34’ xmlns=’http://www.w3.org/2000/svg’>” & “<line x1=’12’ y1=’17’ x2=’188′ y2=’17’ stroke=’%23C6CCD6′ stroke-width=’2’/>” & “<line x1=’12’ y1=’17’ x2='”
        & FORMAT ( MIN ( _ActualX, _TargetX ), “0.0” ) & “‘ y2=’17’ stroke='” & _Color & “‘ stroke-width=’3’/>” & “<circle cx=’12’ cy=’17’ r=’5′ fill=’white’ stroke=’%237A8493′ stroke-width=’2’/>” & “<polygon points=’188,10 195,17 188,24 181,17′ fill=’white’ stroke=’%237A8493′ stroke-width=’2’/>” & _Overrun & _Marker & “<text x=’266′ y=’21’ font-family=’Segoe UI’ font-size=’12’ font-weight=’700′ fill='” & _Color & “‘>” & _Label & “</text></svg>”
RETURN
    IF ( _Valid, _Svg )

The Loan Decision SLA SVG measure converts SLA calculations into an SVG data URI that can be rendered as an image inside a native Power BI table. Rather than creating a separate chart, measure generates a small timeline for each application row. The SVG dynamically changes according to the application’s SLA status, elapsed time, completion state, and variance. The measure performs the following steps:

  1. Validates row context to ensure visual is generated for a single application.
  2. Retrieves the SLA target and elapsed hours from supporting measures.
  3. Determines whether the application is open or completed using Decision At field.
  4. Retrieves the calculated SLA Status, which controls visual color.
  5. Calculates the SLA variance between elapsed time and target.
  6. Converts elapsed time into a position on timeline relative to the SLA target.
  7. Caps extreme values so unusually large breaches do not distort table layout.
  8. Generates the SVG elements including the submission marker, SLA target, current/completed marker, overrun line, arrow, and variance label.

Status-based colors

The SVG takes its status from separate SLA Status measure and assigns a corresponding color:

SLA Status

Visual colour

Meaning

Within SLA

Blue

Open application with sufficient time remaining.

At risk

Amber

Open application approaching its SLA target.

Completed on time

Green

Decision completed within the SLA.

Completed late

Red

Decision completed after the SLA.

Breached

Dark red

Open application has exceeded the SLA.

Data issue / other

Gray

Invalid or unavailable SLA data.

Using separate colors for the Completed Late and the Breached also distinguishes two different operational situations.  One application has already been completed late, while the other is still open and has exceeded its target.

Building the Dashboard

Final Loan Decision SLA Monitor combines custom SLA timeline with standard Power BI reporting features.

KPI Summary

Cards at the top provide an immediate summary of applications across major SLA states:

  • Within SLA
  • Completed On Time
  • At Risk
  • Completed Late
  • Breached

Operational Table

The native table keeps SLA visual alongside the application context:

  • Application ID
  • Product
  • Owner
  • Date
  • Current Stage
  • Loan Decision SLA SVG
  • SLA Status
Operational Table

This means reviewers can see what the application is, who owns it, where it is in process, and how its SLA is performing in the same row.

Filters

The dashboard also includes filters for:

  • Product
  • Stage
  • Owner
  • Risk Band

This allows operations team to narrow review to a particular product, processing stage, owner or risk category.

From Problem to Solution

Before

After

Multiple timestamp column had to be compared.

SLA progress is represented in one timeline.

SLA status was difficult to interpret at glance.

Status and exact variance are shown together.

Native formatting could communicate colour but not complete timeline.

SVG adds lines, markers, and symbols.

Open and completed applications could look similar.

Hollow and filled markers distinguish lifecycle state.

Extreme breaches could distort visual scale.

A capped position and arrow can handle extreme values.

Application context could become separated from the urgency information.

SLA signal stays beside the application details.

Reviewers had to mentally reconstruct timeline.

Timeline is visible directly in the row.

The Operational Workflow

The resulting workflow is simple:

The reviewer can sort applications using escalation rank, scan the SLA timelines for breached or late cases, review at-risk applications, and use the Owner and Current Stage fields to determine where action should be routed. The raw timestamps remain available when detailed investigation is required, but they no longer dominate primary operational view.

Conclusion

The Loan Decision SLA Timeline demonstrates how DAX and SVG extend a native Power BI table when standard formatting does not fully meet reporting requirements. Using fictionalized loan application data, the solution transforms separate SLA fields into a single visual timeline that communicates progress, target, lifecycle state, and variance. By combining DAX calculations with dynamically generated SVG inside the native Power BI table, the dashboard allows users to understand where application stands relative to its SLA without mentally reconstructing timeline from multiple columns.

Downloads

Further Learning and Resources

To learn more about Power BI, check out our courses here: 

Want to learn how Microsoft 365 Copilot transforms everyday work with AI? Check out our Course:  

For end-to-end solutions customized to your problems, Get in touch with our Consultants:  

Want to learn more about Power BI and how to make reports more efficiently? 

Power BI training in Australia: We offer comprehensive training sessions across various cities, including : 

Ready to enhance your Power BI skills? Sign up for our training courses and explore our wide range of resources designed to elevate your data analytics capabilities.  

Want end-to-end solutions for your Power BI Reports? Get in touch with our consultants at Power BI Consulting & Training Services in Australia

Contact Us: Make an enquiry about our Power BI courses and find the proper training for you.  

 

Leave a Reply

Your email address will not be published. Required fields are marked *