Forum Discussion
Conditional Formatting with static and dynamic data
- 1 year ago
hello mundy727
i dont know how you pulled Load and Capacity, so i am not sure what form Load and Capacity are (column or measure).
but here is one of many ways to do conditional formating. please check if this accomodate your need.
1. If Load and Capacity are column, create new measure with following DAX. you can change the color code based on your requirement.
Color Palette =
var _Capacity = SELECTEDVALUE('Table'[Recruiter Capacity])
var _Load = SELECTEDVALUE('Table'[Total Req Load])
Return
IF(
_Load>=_Capacity,
"#FF0000"
)2. Pick one or more columns you want to do conditional formating from that down-arrow (you need to do the same step for other column). then go to conditional formating, then choose what kind of formating you want (i used background in this case).3. choose Field Value, then select the created measure from before.
4. here is the result
if Load and Capacity are measure, then change the DAX into this and the rest are exactly the same.
Color Palette =
IF(
[Load]>=[Capacity],
"#FF0000"
)Hope this will help.
Thank you.
I believe you need another measure, say "overload" boolean to calculate whether load > capcity.
then add conditional formatting when "overload" is true, red, else, green.