Forum Discussion
Matrix table conditional format based on row and column fields not values
- 1 year ago
Hi Elizz
Thanks for reaching out to the Microsoft fabric community forum.
Create Conditional Formatting DAX Measure -
MatrixCellColor =
VAR _Status = SELECTEDVALUE(Appointments[Status])
VAR _Week = SELECTEDVALUE(Appointments[Week])
RETURN
SWITCH(
TRUE(),
_Status = "TCI After Breach", "#FF6B6B",
_Status = "PastTCI", "#FF6B6B",
_Status = "TCI Before Breach", "#5DADE2",
_Status = "Pending" && _Week <= 5, "#5DADE2",
_Status = "Pending" && _Week > 5, "#FF6B6B",
"#FFFFFF"
)
Apply Conditional Formatting
In Visualizations pane go to Values - dropdown - Conditional formatting - Background colorSelect :
Format by: Field value
Based on field: MatrixCellColor
Please find the below attached .pbix file for your reference.
Regards,
Sreeteja
thank you, i just tried a simple count of a field in the fact table, and it still doesnt apply the conditional format. i even changed the hex codes to a common pallete colour ive used throughout the report. Im guessing it is down to my version, but getting our IT dept to update it is hard work! haha. i take it there is no other work around on this version?
i will pester my IT dept some more.
i will mark this as helpful as i know it will work with a more uptodate version of PBI.
thank you for all your help
Hi Elizz ,
Thank you ! If the response was helpful and your issue is resolved or awaiting a version update, please consider closing the thread by marking it as solved, as this benefits others in the community.