Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi All
Im trying to compare values a matrix for student scores across assessment stages, I have created a summarised table and ranked scores which provides this:
Assessment Table:
I then create a matrix of the scores and produce this visual:
I need to show icons where the scores has either increased (up arrow), decreased (down arrow), or stayed the same (sideway arrow). However the conditional formating does not allow me to compare individual scores within the matrix. for example for thefirst row since 5 is more than 3 I need to show an upwards arrow and then a downward arror for the next score which is 3.
I have blanked out the customer IDs for data protection protection purposes.
Any suggestions greatly appreciated.
Solved! Go to Solution.
Hi @Elisa112 ,
Thanks for reaching out to Microsoft Fabric Community Forum.
Based on the above scenario ,
First fetch Previous Score using below DAX query :
PreviousScore =
VAR CurrentStudent = Sheet1[StudentID]
VAR CurrentStage = 'Sheet1'[AssessmentStage]
RETURN
CALCULATE(
MAX('Sheet1'[Score]),
FILTER(
'Sheet1',
'Sheet1'[StudentID] = CurrentStudent &&
'Sheet1'[AssessmentStage]= CurrentStage - 1
)
)
create a new calucalted cloumn for change direction as below :
ScoreTrend =
VAR Curr = 'Sheet1'[Score]
VAR Prev = 'Sheet1'[PreviousScore]
RETURN
IF(ISBLANK(Prev), BLANK(),
SWITCH(TRUE(),
Curr > Prev, "UP",
Curr < Prev, "DOWN",
Curr = Prev, "SAME"
)
)
create a matrix visual and apply conditional formatting the icon set to display up, down, or same arrows based on the ScoreChange.
Below is the expected output :
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
Hello @Elisa112
Try this measure
Score with Trend Arrow =
VAR CurrentStage = SELECTEDVALUE('AssessmentTable'[Rank])
VAR CurrentScore = SELECTEDVALUE('AssessmentTable'[Score])
VAR PreviousScore =
CALCULATE(
MAX('AssessmentTable'[Score]),
FILTER(
'AssessmentTable',
'AssessmentTable'[Student ID] = SELECTEDVALUE('AssessmentTable'[Student ID]) &&
'AssessmentTable'[Rank] = CurrentStage - 1
)
)
VAR TrendArrow =
SWITCH(
TRUE(),
ISBLANK(PreviousScore), "", -- No arrow for first column
CurrentScore > PreviousScore, UNICHAR(9650), -- ↑ Up arrow
CurrentScore < PreviousScore, UNICHAR(9660), -- ↓ Down arrow
CurrentScore = PreviousScore, UNICHAR(8594) -- → Right arrow
)
RETURN
FORMAT(CurrentScore, "0") & " " & TrendArrow
Thanks,
Pankaj Namekar | LinkedIn
If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated
thank you so much for this, I have tried to use your solution in the matrix, but I am still getting the same result :
Am I doing something wrong here?
Hi @Elisa112 ,
Thanks for reaching out to Microsoft Fabric Community Forum.
Based on the above scenario ,
First fetch Previous Score using below DAX query :
PreviousScore =
VAR CurrentStudent = Sheet1[StudentID]
VAR CurrentStage = 'Sheet1'[AssessmentStage]
RETURN
CALCULATE(
MAX('Sheet1'[Score]),
FILTER(
'Sheet1',
'Sheet1'[StudentID] = CurrentStudent &&
'Sheet1'[AssessmentStage]= CurrentStage - 1
)
)
create a new calucalted cloumn for change direction as below :
ScoreTrend =
VAR Curr = 'Sheet1'[Score]
VAR Prev = 'Sheet1'[PreviousScore]
RETURN
IF(ISBLANK(Prev), BLANK(),
SWITCH(TRUE(),
Curr > Prev, "UP",
Curr < Prev, "DOWN",
Curr = Prev, "SAME"
)
)
create a matrix visual and apply conditional formatting the icon set to display up, down, or same arrows based on the ScoreChange.
Below is the expected output :
If this post was helpful, please consider marking Accept as solution to assist other members in finding it more easily.
If you continue to face issues, feel free to reach out to us for further assistance!
can you please send the file again as I cannot access your last message, even though I received an email notification.
thanks again
Hi @Elisa112 ,
Please find the attachment for working solution. Let us know if you face any difficulties in accessing the file.
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!
Thanks & Regards,
Rekha,
CustomerSupportTeam.
Hi @v-aatheeque
Unfortunately I am getting blank results in the matrix, as the calculated column you provided does not work, are you able to share the file with me please
thank you
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.