Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
duesouth
Helper I
Helper I

Add Arrows to a Matrix

I've got a matrix for % attendance in a school - which is cumulative attendance week-on-week, as below:

 

                                                                                      Week Ending
Name23/05/202530/05/202506/06/202513/06/2025
Pupil 195.5%95.5%95.8%95.9%
Pupil 298.1%97.5%97.6%97.6%

 

I'd like Power BI to compare a week to the previous week and add up/down/same arrows to make it easy to see (so for pupil 1, comparing 13 June to 6 June attendance is up, so I'd like an up arrow to be displayed next to the 13/06/2025 column).

 

Is this possible?  As always, any and all help greatly appreciated.

1 ACCEPTED SOLUTION
Elena_Kalina
Solution Sage
Solution Sage

Hi @duesouth 

  1. First create a measure to calculate the difference:

Attendance Change = 
VAR CurrentWeek = MAX('Date'[Date])
VAR CurrentAttendance = [Attendance Measure]

VAR PreviousWeek = 
    CALCULATE(
        MAX('Date'[Date]),
        FILTER(
            ALLSELECTED('Date'),
            'Date'[Date] < CurrentWeek
        )
    )

VAR PreviousAttendance = 
    CALCULATE(
        [Attendance Measure],
        FILTER(
            ALLSELECTED('Date'),
            'Date'[Date] = PreviousWeek
        )
    )

RETURN
    IF(
        NOT(ISBLANK(PreviousAttendance)),
        CurrentAttendance - PreviousAttendance,
        BLANK()
    )
  1. Then apply conditional formatting to your attendance values:

    • Select your matrix visual

    • Go to "Conditional formatting" → "Icons"

    • Set up rules like:

      • When value > 0.001 → Green up arrow

      • When value < -0.001 → Red down arrow

    • Base the formatting on the "Attendance Change" measure

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

 

View solution in original post

4 REPLIES 4
speedramps
Super User
Super User

Hi @duesouth 

Try this ...

 

Create data

speedramps_1-1750154407195.png

 

 

Create measure

 

Arrow = 
VAR thisweek = SELECTEDVALUE('Table'[Week])
VAR thisattendance = SUM('Table'[Attendance%])
VAR previousattendance =
CALCULATE(
    SUM('Table'[Attendance%]),
    ALL('Table'[Week]),
    'Table'[Week] = thisweek - 7
    )
 RETURN
SWITCH(TRUE(),
ISBLANK(previousattendance),FORMAT(thisattendance,"Percent"),
thisattendance =  previousattendance,FORMAT(thisattendance,"Percent"),
thisattendance >  previousattendance, CONCATENATE(FORMAT(thisattendance,"Percent"), "▲"),
CONCATENATE(FORMAT(thisattendance,"Percent"), "▼")
 )

 

Draw matrix

 

speedramps_2-1750154466122.png

 

 

Please click thumbs up and accept solution

Elena_Kalina
Solution Sage
Solution Sage

Hi @duesouth 

  1. First create a measure to calculate the difference:

Attendance Change = 
VAR CurrentWeek = MAX('Date'[Date])
VAR CurrentAttendance = [Attendance Measure]

VAR PreviousWeek = 
    CALCULATE(
        MAX('Date'[Date]),
        FILTER(
            ALLSELECTED('Date'),
            'Date'[Date] < CurrentWeek
        )
    )

VAR PreviousAttendance = 
    CALCULATE(
        [Attendance Measure],
        FILTER(
            ALLSELECTED('Date'),
            'Date'[Date] = PreviousWeek
        )
    )

RETURN
    IF(
        NOT(ISBLANK(PreviousAttendance)),
        CurrentAttendance - PreviousAttendance,
        BLANK()
    )
  1. Then apply conditional formatting to your attendance values:

    • Select your matrix visual

    • Go to "Conditional formatting" → "Icons"

    • Set up rules like:

      • When value > 0.001 → Green up arrow

      • When value < -0.001 → Red down arrow

    • Base the formatting on the "Attendance Change" measure

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

 

Worked perfectly - thank you so much!

If the default arrow icons don't meet your needs, there are several alternative ways to implement custom trend indicators in Power BI:

  1. DAX Character Arrows
    You can directly include arrow symbols (▲▼↗↘→) in your DAX measures by concatenating them with your values. This approach uses Unicode characters and works across all Power BI visuals.

  2. JSON Formatting
    Power BI allows custom icon sets through JSON formatting rules. You can:

    • Create a JSON file defining your preferred icons

    • Specify exact colors and positioning

    • Apply different icon styles for various value ranges
      This method provides consistent styling across your report.

  3. SVG Icons
    For complete design control:

    • Embed SVG code directly in your measures

    • Customize every aspect (shape, color, size)

    • Use any vector graphic as an indicator
      Note: SVG rendering only works in web browsers, not the desktop app.

 

If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

Thank you.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.