Forum Discussion
Add Arrows to a Matrix
- 1 year ago
Hi duesouth
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() )
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.
Hi duesouth
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() )
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.
- Elena_Kalina1 year agoSolution Sage
If the default arrow icons don't meet your needs, there are several alternative ways to implement custom trend indicators in Power BI:
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.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.
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.
- duesouth1 year agoHelper I
Worked perfectly - thank you so much!