Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello everyone,
Haven't done anything similar before, I am currious if I am able to change background color based on value in matrix table.
I have country column as you can see from image and two countries are columns values (spain and portugal) and some values about counties.
I would like to have red color if the values are not matching and green if the values are matching.
I have tried few things but the meausre I was creating wasn't good.
Solved! Go to Solution.
@Anonymous , You need to create a measure like , assume you have measure M1
color =
var _diff = if( calculate([M1] , Table[country] ="spain") = calculate([M1] , Table[country] ="Portugal") ,1,0)
return
if(_diff =1, "Green", "Red")
Use this in conditional formatting using filed value option
How to do conditional formatting by measure and apply it on pie? : https://youtu.be/RqBb5eBf_I4
@Anonymous , You need to create a measure like , assume you have measure M1
color =
var _diff = if( calculate([M1] , Table[country] ="spain") = calculate([M1] , Table[country] ="Portugal") ,1,0)
return
if(_diff =1, "Green", "Red")
Use this in conditional formatting using filed value option
How to do conditional formatting by measure and apply it on pie? : https://youtu.be/RqBb5eBf_I4
This was very helpful, thanks a lot!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!