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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sameergupta60
Helper IV
Helper IV

Conditional formatting help on count

Dear Team,

 

Need help with conditional formatting.

 

 

sameergupta60_0-1660283701917.png

 

if my RCC is on  max count then block work conditional formatting -7 with any red cell color

 

Example = 26-7 = 19 but the current status of Block work  7 so this cell has highlighted using conditional formatting. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @sameergupta60 ,

 

Please try this measure:

Measure = 
VAR _maxrcc = MAXX(SUMMARIZE('Table','Table'[Tower Name],"rcc",[RCC]),[rcc])
VAR _colour =
IF([RCC]-7>[Block Works]&&[RCC]=_maxrcc,"Red","Green")
RETURN
_colour

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

Hi @sameergupta60 ,

 

Please try this measure:

Measure = 
VAR _maxrcc = MAXX(SUMMARIZE('Table','Table'[Tower Name],"rcc",[RCC]),[rcc])
VAR _colour =
IF([RCC]-7>[Block Works]&&[RCC]=_maxrcc,"Red","Green")
RETURN
_colour

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Dear Team,

 

this solution work on the tower level summary.

BWNEWBICFzone = VAR _maxrcc = MAXX(SUMMARIZE('L1','L1'[Code33],"rcc",[RCCCount]),[rcc])
VAR _colour = IF([RCCCount]-7>[BWcount]&&[RCCCount]=_maxrcc,"Red","Green") RETURN _colour

sameergupta60_0-1661409154187.png

but when we add the same logic to the project summary it is not showing results properly.

sameergupta60_1-1661409183683.png

 

if we see at the project level total of 13 the block work must be red but it is showing green.

 

Can please share logic for project level

 

 

 

 

Anonymous
Not applicable

Hi @sameergupta60 ,

 

Would you please consider sharing a sample file for testing, that would be helpful, thanks in advance!

 

Best Regards,
Gao

Community Support Team

Hi,

 

Please download the sample file from below link.

 

https://wetransfer.com/downloads/4e1fd20c0661e992712f0076cb6d9f3820220825071103/3c5da46b6880e37c47ea...

 

Regards,

Sameer 

 

Anonymous
Not applicable

Hi @sameergupta60 ,

 

These two visual effects have different calculation contexts, and you need to modify the formula according to the actual situation. Please try this measure.

BWNEWBICFzone = 
VAR _maxrcc =
    MAXX ( SUMMARIZE ( 'L1', 'L1'[ProjectName], "rcc", COUNT('L1'[New RCC]) ),[rcc] )
VAR _colour =
    IF ( COUNT('L1'[New RCC]) - 7 > COUNT('L1'[BW2])&&COUNT('L1'[New RCC])=_maxrcc, "Red", "Green" )
RETURN
    _colour

vcgaomsft_0-1661415102594.png

Best Regards,
Gao

Community Support Team

hi,

Example

we have 1 project & 4 towers 

if my RCC is on 32 towers then block work should be on 25 floors is green or red (we wrote conditional formatting measures tower-wise)

 

When we add the total to the project level RCC 128 no then block work 100 no means it is green ( but with your measures it is showing red)

 

please help 

Dear Sir,

if my RCC counts on 8 floors then the block work count should be on 1 floor.

if is on 1 floor then it is green or red if it is not on 1 floor.

But if my RCC floor is on 5 floors then blockwork works have yet to start and need no color formatting that time.

amitchandak
Super User
Super User

@sameergupta60 , Not very clear. But you can create a color measure and use that in conditional formatting using field value option

 

Switch(True(),

[Total RCC] - [Block works] >[RCC] , "Red", "Green" )

 

You can also have default as blank

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Dear Sir,

 

if my RCC is on the 25 floors then my block should be on 18 floors but in current progress it is on 7 floors so should be a  highlighted red color in Block works.

Dhacd
Resolver III
Resolver III

Hi can you share a sample data set.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors