Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
francino
Frequent Visitor

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:

francino_0-1615220780584.png

 

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!

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
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:

Condit format.JPG

 

Condit form res.JPG

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
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.

PaulDBrown
Community Champion
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:

Condit format.JPG

 

Condit form res.JPG

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.