Forum Discussion
Conditional formatting not applied
- Anonymous1 year ago
Hi dhrupal_shah ,
You can try the following measure.
Measure = VAR _sum = SUM('Production'[QtyRecv]) RETURN SWITCH( TRUE(), TRIM(MAX('Production'[ComponentName])) = "CTL 1" && _sum > 50 , "#008000", // Green TRIM(MAX('Production'[ComponentName])) = "CTL 1" && _sum >=35 && _sum <= 50, "#000a00", // Black TRIM(MAX('Production'[ComponentName])) = "CTL 1" && _sum > 0 && _sum < 35, "#FF0000" //Red )Also, depending on whether you want all columns to have conditional formatting added to them? If so, just remove the condition “TRIM(MAX(‘Production’[ComponentName])) = ‘CTL 1’”
More detailed information can be found in the attachment.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi dhrupal_shah ,
You can try the following measure.
Measure =
VAR _sum = SUM('Production'[QtyRecv])
RETURN
SWITCH(
TRUE(),
TRIM(MAX('Production'[ComponentName])) = "CTL 1" && _sum > 50 , "#008000", // Green
TRIM(MAX('Production'[ComponentName])) = "CTL 1" && _sum >=35 && _sum <= 50, "#000a00", // Black
TRIM(MAX('Production'[ComponentName])) = "CTL 1" && _sum > 0 && _sum < 35, "#FF0000" //Red
)
Also, depending on whether you want all columns to have conditional formatting added to them? If so, just remove the condition “TRIM(MAX(‘Production’[ComponentName])) = ‘CTL 1’”
More detailed information can be found in the attachment.
Best Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.