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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
dirkkoch
Helper III
Helper III

Conditional formatting with measure for font color (date column value blank and not blank)

Hi, 

 

I have a calculated date column (column name: hexcode) and I want to create a measure which sets the hex code to a data card visual to font color white (#ffffff) if it is blank and to font color yellow (#f8f32b) it there is a date shown in the column. 

 

So far I tried to following measure but it does not return a white font color, although the date column is empty/blank:

calculate(if(sum('table1'[hexcode].[Date])=BLANK(),"#ffffff", "#f8f32b"))

dirkkoch_0-1668759721074.png

I would be thankful for any support!

 

2 ACCEPTED SOLUTIONS
Uspace87
Resolver III
Resolver III

Hi,

 

What I would do is to create a calculated column that return the colour:

 

Date Formatted = IF(Date_Table[Date]=BLANK(),"#ffffff", "#f8f32b")
 
Then in the "Callout Value section" of your Card you can set to change the colour based on the Calculated column you have created:
 
Uspace87_0-1668761390616.png

 

View solution in original post

@Uspace87  That seems to do the job. Thanks!

View solution in original post

2 REPLIES 2
Uspace87
Resolver III
Resolver III

Hi,

 

What I would do is to create a calculated column that return the colour:

 

Date Formatted = IF(Date_Table[Date]=BLANK(),"#ffffff", "#f8f32b")
 
Then in the "Callout Value section" of your Card you can set to change the colour based on the Calculated column you have created:
 
Uspace87_0-1668761390616.png

 

@Uspace87  That seems to do the job. Thanks!

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors