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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
gwoodley
Frequent Visitor

Martix Conditional Formating

Hi I have a matrix table that will add a column for each new year to show a percentage against countries.

gwoodley_0-1714807812475.png

What I would like to do is format the percentages to identify if they have increased, or decreased from the year before, ideally by adding Icons - Percentage increased show Green up Triangle, Percentage decreased show Red Down Triangle.

 

The years are created using Date hierarchy - Year

The values based on a column - ([Average]/100)

 

Is this possible?

Thanks

 

1 ACCEPTED SOLUTION
ddpl
Solution Sage
Solution Sage

@gwoodley 

 

CF =
VAR curr = MAX('Table'[Year])
VAR currValue = CALCULATE(SUM('Table'[Value]), 'Table'[Year] = curr)
VAR prevValue =
    CALCULATE(
        SUM('Table'[Value]),
        FILTER(ALL('Table'[Year]), 'Table'[Year] < curr)
    )
RETURN
    SWITCH(
        TRUE(),
        ISBLANK(prevValue), BLANK(),
        currValue > prevValue, 1,
        currValue < prevValue, 2,
        currValue = prevValue, 3,
        4
    )
try this
 

View solution in original post

2 REPLIES 2
gwoodley
Frequent Visitor

Thanks ddpl, just what I wanted 😊

ddpl
Solution Sage
Solution Sage

@gwoodley 

 

CF =
VAR curr = MAX('Table'[Year])
VAR currValue = CALCULATE(SUM('Table'[Value]), 'Table'[Year] = curr)
VAR prevValue =
    CALCULATE(
        SUM('Table'[Value]),
        FILTER(ALL('Table'[Year]), 'Table'[Year] < curr)
    )
RETURN
    SWITCH(
        TRUE(),
        ISBLANK(prevValue), BLANK(),
        currValue > prevValue, 1,
        currValue < prevValue, 2,
        currValue = prevValue, 3,
        4
    )
try this
 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.