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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register 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
v-cgao-msft
Community Support
Community Support

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
v-cgao-msft
Community Support
Community Support

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

 

 

 

 

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 

 

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...

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 Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.