Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear Team,
I need help with conditional formatting.
Solved! Go to Solution.
@sameergupta60 , Try like
BWNEWBICFR1 = VAR _maxrcc = MAXX(SUMMARIZE('L1','L1'[Code33],"rcc",[RCCCount]),[rcc])
VAR _colour = Switch(True() ,
[RCCCount]-6>[BWcount]&&[RCCCount]=_maxrcc,"Green",
[RCCCount]-7>[BWcount]&&[RCCCount]=_maxrcc,"Amber",
"Red"
) return _colour
or
BWNEWBICFR1 = VAR _maxrcc = MAXX(SUMMARIZE('L1','L1'[Code33],"rcc",[RCCCount]),[rcc])
VAR _colour = Switch(True() ,
[RCCCount]-7>[BWcount]&&[RCCCount]=_maxrcc,"Amber",
[RCCCount]-6>[BWcount]&&[RCCCount]=_maxrcc,"Green",
"Red"
) return _colour
Hi @sameergupta60 ,
When you use switch(), you should give it a range. SWITCH will return the result when the condition holds, regardless of whether the condition that follows is true or false
So:
BWNEWBICFR1 =
VAR _maxrcc =
MAXX ( SUMMARIZE ( 'L1', 'L1'[Code33], "rcc", [RCCCount] ), [rcc] )
RETURN
SWITCH (
TRUE (),
[RCCCount] - [BWcount] > 7
&& [RCCCount] = _maxrcc, "Orange",
[RCCCount] - [BWcount] = 7
&& [RCCCount] = _maxrcc, "green",
"red"
)
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@sameergupta60 , Try like
BWNEWBICFR1 = VAR _maxrcc = MAXX(SUMMARIZE('L1','L1'[Code33],"rcc",[RCCCount]),[rcc])
VAR _colour = Switch(True() ,
[RCCCount]-6>[BWcount]&&[RCCCount]=_maxrcc,"Green",
[RCCCount]-7>[BWcount]&&[RCCCount]=_maxrcc,"Amber",
"Red"
) return _colour
or
BWNEWBICFR1 = VAR _maxrcc = MAXX(SUMMARIZE('L1','L1'[Code33],"rcc",[RCCCount]),[rcc])
VAR _colour = Switch(True() ,
[RCCCount]-7>[BWcount]&&[RCCCount]=_maxrcc,"Amber",
[RCCCount]-6>[BWcount]&&[RCCCount]=_maxrcc,"Green",
"Red"
) return _colour
Thanks for your support we have to add one conditional formatting in the existing
measure that
[RCCCount]="T01"-80>[BWcount]&&[RCCCount]+_maxrcc,"Yellow",
if my terrace finish & blockwork is not started with more than 80-day gaps it should be yellow
Dear Sir,
we have to add three conditional formatting.
1) if my RCC is on 20 floors then blockwork should be on 13 floors means 7 floors less than it has to Orange color
2)if my RCC is on 20 floors then blockwork should be on 14 floors means 6 floors less than it has to green color
3)if both conditional is not fulfilled then it should be RED.
Hi @sameergupta60 ,
When you use switch(), you should give it a range. SWITCH will return the result when the condition holds, regardless of whether the condition that follows is true or false
So:
BWNEWBICFR1 =
VAR _maxrcc =
MAXX ( SUMMARIZE ( 'L1', 'L1'[Code33], "rcc", [RCCCount] ), [rcc] )
RETURN
SWITCH (
TRUE (),
[RCCCount] - [BWcount] > 7
&& [RCCCount] = _maxrcc, "Orange",
[RCCCount] - [BWcount] = 7
&& [RCCCount] = _maxrcc, "green",
"red"
)
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your support we have to add one conditional formatting in the existing
measure that
[RCCCount]="T01"-80>[BWcount]&&[RCCCount]+_maxrcc,"Yellow",
if my terrace finish & blockwork is not started with more than 80-day gaps it should be yellow
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 46 | |
| 42 | |
| 34 | |
| 31 | |
| 21 |
| User | Count |
|---|---|
| 143 | |
| 125 | |
| 100 | |
| 81 | |
| 63 |