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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PraveenMRRP
Frequent Visitor

Conditional Formatting on Matrix - Comparing Values per Previous Quarters Dynamically

Hi all,

 

Hoping to get some assistance - I have seen many posts that have similar issues, however, unable to get this to work myself.

PraveenMRRP_0-1708445460559.png

I require that every quarter should compare with previous quarter if amount reduces by 10% it should change font color

For Example Product 'A'  Q1 2023 has 45 amount

                                       In next quater(Q2 2023) amount is 25 [Compared to previous quarter it is reduced by 10% so font color should change ] then

                                       In next Quarter(Q3 2023)amount is 34 [Compare to previous quarter amount I is increased so font color should not change]

 

This should be dynamic as new quarter will be added in future the logic should behave same.

 

Hoping for assistance

 

Thanks In Adavance

 

2 REPLIES 2
vicky_
Super User
Super User

I first created a measure to calculate the change % - 

Change (%) = 
var prevAmt = CALCULATE(SUM('Table (2)'[Amt]), PREVIOUSQUARTER('Table (2)'[Date]))
var currentAmt = SUM('Table (2)'[Amt])
var change = (currentAmt - prevAmt) / currentAmt
return IF(ISBLANK(prevAmt), BLANK(), change)

Then go to Format Visual > Cell Elements > Font Colour > fx

vicky__0-1708466572044.png

and use the following settings:
Format style = Rules
What field should we base this on = Change (%) Note: this is the measure I created earlier

Rules = If value >= 0 percent and < 0.1 number then colour.

Hi,

 

 I tried but not getting required result

PraveenMRRP_0-1708938945472.png

 

Sharing pbix file for reference

https://drive.google.com/file/d/13Rk5xfCJtfJ_xpkK9etwqGMdWREx0RL7/view?usp=sharing

 

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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