Forum Discussion
Conditional Formatting - Multiple Criteria
- 4 years ago
Try this measure
measure = var _a= min('Table'[Product Profit]) var _b= min('Table'[Parts Profit]) var _c= min('Table'[Margin]) return SWITCH(TRUE(), _a>0 && _b>0 && _c>0,"Green", _a<0 && _b>0 && _c>0,"Yellow", _a<0 && _b<0 && _c<0,"Red")Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
Try this measure
measure =
var _a= min('Table'[Product Profit])
var _b= min('Table'[Parts Profit])
var _c= min('Table'[Margin])
return
SWITCH(TRUE(),
_a>0 && _b>0 && _c>0,"Green",
_a<0 && _b>0 && _c>0,"Yellow",
_a<0 && _b<0 && _c<0,"Red")
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
- PThompson18884 years agoRegular Visitor
This worked!!
Thanks so much. - sizi2 years agoHelper II
Hello all,
I have a similar requirement wherein I need to define user's occupancy in a month based on number of projects assigned during the time period. Ex: For January month if a user has 6 projects planned between Jan 5-Jan 25, 1st project is falling between Jan 5th-Jan10th, 2nd & 3rd project between Jan 10-Jan15th and Last 3 project between Jan 16th-Jan 25th, then for the 1st condition, the timeline should be relatively free colored green, for 2nd condition, it should be medium as there's 2 projects and colored yellow and for the last 3 project it should be high colored red and all this needs to defined based on demands and start and end date of task.
Basically If one task then free = green, 2 task then medium =yellow and if user has 3 task and more than highly busy = red based on dates overlap. I need this to be visualised.
Below is the sample data.
Task Number Users Start Date Complete Date 101 John 1/1/2024 5/1/2024 102 John 6/1/2024 11/1/2024 103 John 6/1/2024 11/1/2024 104 John 6/1/2024 11/1/2024 105 John 12/1/2024 17/1/2024 106 John 12/1/2024 17/1/2024 107 John 18/1/22024 23/1/2024 108 John 18/1/22024 23/1/2024 109 John 18/1/22024 23/1/2024 110 John 18/1/22024 23/1/2024 111 John 18/1/22024 23/1/2024 112 John 18/1/22024 23/1/2024 113 Bethany 1/1/2024 4/1/2024 114 Bethany 1/1/2024 4/1/2024 115 Bethany 5/1/2024 6/1/2024 116 Bethany 6/1/2024 11/1/2024 117 Bethany 6/1/2024 11/1/2024 118 Bethany 18/1/22024 23/1/2024 119 Bethany 18/1/22024 23/1/2024 120 Bethany 18/1/22024 23/1/2024 121 Bethany 24/1/2024 30/1/2024 122 Bethany 24/1/2024 30/1/2024 123 Bethany 24/1/2024 30/1/2024 124 Bethany 24/1/2024 30/1/2024 If user a has task >=1 at a time then it shall show green,
If user has task = 2 at a time then it shall show yellow.
And if user has task > 2 at a time then red. All this shall be based on RG start & RG completion date.
If there are 5 user, each user shall have a bar showing his occupancy in either green, yellow or red based based on dates.
KIndly help. Thanks in advance.