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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
lifeofthenoobie
Frequent Visitor

Conditional formatting of percentage measure

Hello, 
I have a calculated group and one of items in Delta of Sum of Sales in percentage like

 

        DIVIDE(
            SELECTEDMEASURE() - CALCULATE(SELECTEDMEASURE(), SAMEPERIODLASTYEAR('dim_calendar'[Date])),
            CALCULATE(SELECTEDMEASURE(), SAMEPERIODLASTYEAR('dim_calendar'[Date])),
            0
        ),
 
and what I want to achieve is when the percentage is on minus for example -5%, -10% I want this cell in matrix to be highlighted in red (or the font be red if can't make it cell), otherwise if its on plus like 5% or 10% then green
 
How to achieve this? I tried with rules but its not quite what I expect I guess?
1 ACCEPTED SOLUTION
BeaBF
Super User
Super User

@lifeofthenoobie Hi! Create a measure on the Delta Percentage measure for the conditional formatting, like:

ColorIndicator =
VAR DeltaPercent = [DeltaPercentage]

RETURN
IF(
DeltaPercent < 0, // If percentage change is negative
"Red", // Return "Red" for negative change
"Green" // Return "Green" for positive change
)

then use this measure as field for the conditional formatting.

 

BBF

View solution in original post

1 REPLY 1
BeaBF
Super User
Super User

@lifeofthenoobie Hi! Create a measure on the Delta Percentage measure for the conditional formatting, like:

ColorIndicator =
VAR DeltaPercent = [DeltaPercentage]

RETURN
IF(
DeltaPercent < 0, // If percentage change is negative
"Red", // Return "Red" for negative change
"Green" // Return "Green" for positive change
)

then use this measure as field for the conditional formatting.

 

BBF

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.