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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.