Forum Discussion

Elizz's avatar
Elizz
Frequent Visitor
1 year ago
Solved

Matrix table conditional format based on row and column fields not values

Hi   i have this matrix table below (by TCI status and weeks wait), been trying to figure out how to format it so that anything that says TCI after Breach is red, PastTCI is red, TCI before breach ...
  • v-sshirivolu's avatar
    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 color

    Select :
    Format by: Field value
    Based on field: MatrixCellColor


    Please find the below attached .pbix file for your reference.

    Regards,
    Sreeteja