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
Ley022
Frequent Visitor

conditional formating

Hi,

I wan´t to add conditional formating but only when I have a value, so when the value is empty nothing should be applied. If I add conditional formating based on column I have the following result (blue) with It is not correct.

 

Ley022_1-1606305770358.png

Ley022_2-1606305871447.png

 

Thanks in advance

 

7 REPLIES 7
nvprasad
Solution Sage
Solution Sage

Hi,

 

Please Select don't format in the "Default Foratting' dropdown of Advanced Settings. Please refer to below snapshot.

 

nvprasad_1-1606306682911.png

 

Appreciate a Kudos! 🙂
If this helps and resolves the issue, please mark it as a Solution! 🙂

Regards,
N V Durga Prasad

Did I answer your question? Mark my post as a solution! Appreciate your Kudos.
Follow me on LinkedIn.
amitchandak
Super User
Super User

@Ley022 , Can you measure conditional formatting? create a color measure and use that with field value option

example

 

Color Weekday = if(FIRSTNONBLANK('Date'[Weekday],blank()) in {"Sunday", "Saturday"},"lightgreen","red")
Color Weekday = if(weekday(max('Date'[Date]),2) >=6 ,"lightgreen","red")


Color Date =
var _min =minx(allselected(Date,Date[Year])
return
 Switch( true(),
 FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"lightgreen",
  FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"blue",
 "red")

 

Refer:

Color Weekday = if(FIRSTNONBLANK('Date'[Weekday],blank()) in {"Sunday", "Saturday"},"lightgreen","red")
Color Weekday = if(weekday(max('Date'[Date]),2) >=6 ,"lightgreen","red")


Color Date =
var _min =minx(allselected(Date,Date[Year])
return
Switch( true(),
FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"lightgreen",
FIRSTNONBLANK('Date'[Year],year(TODAY()))-_min =0 ,"blue",
"red")

 

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
themistoklis
Community Champion
Community Champion

@Ley022 

 

Under format by select rules and make sure that for blank values to put white background.

See image below:

 

Conditional.JPG

Hi,

thanks, I have applied those changes but I get the following result, an the intermittent color dissahear

Ley022_0-1606306873873.png

@Ley022 

 

Can you share the file with us? Mask any confidential data

Hi, @Ley022 

 

Has your problem been solved? I think that the message5’s solution seems to be the fastest and most effective.

If you take the answer of someone, please mark it as the solution to help the other members who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.

 

Best Regards,
Janey Guo

And if you use colour range, change default format to 'specific colour'  and add white background.

 

See image

 

Specific.JPG

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors