Forum Discussion

djillbunters's avatar
djillbunters
Frequent Visitor
2 years ago
Solved

Matrix table with measures as rows - conditional formatting on specific Column only

Dear all,   I have an annoying but useful Matrix table, which I use to calculate Actual, Budget, Delta & LY. Each row is a measure and using a disconnected table I determined my columns.   Now I...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi djillbunters 

    You need to set the condition at different measures, it cannot be put in one measure, you need to set it with multiple measure.

    If you want to implement it in one measure, you need to put all your one measures in one measure, you can refer to the following solution.

    1.Create a table,put all the measure names to the table. then put the column of the table to the row of the matrix. the column  of the table visual don't change.

    2.Create a measure,and put the measure to the value of the matrix.

     

    Measure =
    SWITCH (
        TRUE (),
        SELECTEDVALUE ( 'Table'[Type] ) = "Total Revenue", [Total Revenue],
        SELECTEDVALUE ( 'Table'[Type] ) = "COGS", [COGS],
        SELECTEDVALUE ( 'Table'[Type] ) = "Gross Margin", [Gross Margin]
    )
    

     

    3.Then create a measure to set the format.

     

    Measure2 =
    IF (
        SELECTEDVALUE ( 'DisconnectedTable'[Classification] ) = "Delta"
            && [Measure] < 0,
        "red"
    )
    

     

    Put the measure2 to the conditional formatting of the measure.

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.