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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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 Supplier
Solution Supplier

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
Community Champion
Community Champion

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 Supplier
Solution Supplier

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
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.