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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
ashik1992
Helper I
Helper I

conditional formatting

Hello Folks,

Im an beginner here . Need one help .

I have a matrix like this. in the row ,there is project details and states. in column there is day data. in value it is count of projects in respective sates.

I want to do  conditional formating .

condition is ,if there is blank cell,make the color grey and it is shown as "N" and if cell is not blank it should display in red color with "Y". Please help me to achieve it

Project details1day1day2day3
Developemnt12 14
testing151313 
ready  12
Project details2   
Developemnt357
testing 8 
ready45  
1 ACCEPTED SOLUTION

@ashik1992 

 

First you need to create 2 measures. One used in the matrix visual and the other that will be used in conditional formatting

Flag measure = if(isblank('project'[daycount]), "N", "Y")

Flag measure Conditional = if(isblank('project'[daycount]), "#CCCCCC", "#FF0010")

 

When you create the matrix visual, select the first measure from conditional formatting section.

Select 'Flag Measure' in conditional formatting section --> and on the pop up window --> select Format by (field Value) --> select the second measure (with the colours)

 

Image below

conditional.jpg

View solution in original post

12 REPLIES 12
amitchandak
Super User
Super User

@ashik1992 , Create a color measure like this and use that is conditional formatting with "Field value" Option

 

color measure =if(isblank([measure], "grey", "red") // where measure is measure you used values

 

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

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

what about indicating 'Y" and N ?

 

@ashik1992 , Where you want to do that, You can have a measure and use that in the matrix

Flag measure =if(isblank([measure], "Y", "N")

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

sir ,if(isblank([measure], "Y", "N") ,what is the measure here ?

@ashik1992 , you have shown a matrix above, what was the value there. Using that as a measure

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

im getting an error that too many arguments passed.

 

Flag measure = if(isblank('project'[daycount], "Y", "N"))

@ashik1992 

 

The closing bracket is in the wrong position. Use the following formula

 

Flag measure = if(isblank('project'[daycount]), "Y", "N")

hello sir ,

how can we apply both this measure on same value ? example i need "Y" for all non blank values and background is green

@ashik1992 

I didnt understand your question? when you say 'apply both this measure' what do you mean?

What do you actually want to achieve?

i want to change the background color where cell cintais "Y" and "N"

@ashik1992 

 

First you need to create 2 measures. One used in the matrix visual and the other that will be used in conditional formatting

Flag measure = if(isblank('project'[daycount]), "N", "Y")

Flag measure Conditional = if(isblank('project'[daycount]), "#CCCCCC", "#FF0010")

 

When you create the matrix visual, select the first measure from conditional formatting section.

Select 'Flag Measure' in conditional formatting section --> and on the pop up window --> select Format by (field Value) --> select the second measure (with the colours)

 

Image below

conditional.jpg

Thank you so much sir

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors