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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Elisa112
Helper V
Helper V

Comparing Matrix Values using Icons

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:

 

Elisa112_0-1744279042319.png

I then create a matrix of the scores and produce this visual:

 

Elisa112_1-1744279362123.png

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.

 

 

1 ACCEPTED 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 :

vaatheeque_0-1744358447712.png

 

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!



View solution in original post

7 REPLIES 7
pankajnamekar25
Super User
Super User

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

Hi @pankajnamekar25 

thank you so much for this, I have tried to use your solution in the matrix, but I am still getting the same result :

 

Elisa112_0-1744290871039.pngElisa112_1-1744290948402.png

 

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 :

vaatheeque_0-1744358447712.png

 

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!



@v-aatheeque 

thank you very much, this is now working very well

Much Appreciated!!

@v-aatheeque 

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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors
Top Kudoed Authors