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.
Worked perfectly - thank you so much!