Forum Discussion

francino's avatar
francino
Frequent Visitor
5 years ago
Solved

Conditional format a matrix column by a measure

I hve a visualization that I am trying to format conditionally.  I have a measure (TotalSalesByDay) that is determined by the Top N Days that a user selects with a What-if selector.  What I need to be able to do is shade each product that is underperforming red...as illustrated in this example:

 

The Threshold % field is a user defined What-if Selection and is multipled by the Average Sales to establish the Threshold.

 

Any product whose sales fall below that threshold need to be shaded red.  I have attempted to add the following measure to the conditional formatting option of the TotalSalesByDay field, but it only returns the false response...shading things white/clear and not red: 

UnderperformColor = if('Table1'[TotalSalesByDay]<[Threshold],"#efb5b9","#FFF")

 

I appreciate any help that can be offered.

 

Thank you in advance!

  • francino 

    Use this measure:

    UnderperformColor = if([TotalSalesByDay]<[Threshold],1)

    in the conditional formatting pane for the [TotalSalesByDay], select the backround colour formatting, and in the options, select Rules and set the value to 1:

     

     

     

2 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    francino 

    Use this measure:

    UnderperformColor = if([TotalSalesByDay]<[Threshold],1)

    in the conditional formatting pane for the [TotalSalesByDay], select the backround colour formatting, and in the options, select Rules and set the value to 1:

     

     

     

  • v-robertq-msft's avatar
    v-robertq-msft
    Community Support

    Hi, francino 

    Have PaulDBrown’s reply helped you to solve this problem?

    If so, would you like to mark his reply as a solution so that others can learn from it too?

    If not, I suggest you to post some sample data or your test pbix file (without sensitive data) and we can help you in advance.

    Thanks in advance!

    How to Get Your Question Answered Quickly 

     

    Best Regards,

    Community Support Team _Robert Qin

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