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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Condtional Formatting Issue

Why does Power BI not let me conditional format something? It blurs out the metric I want to conditionally format.

PrivateAnalytic_0-1655747457726.png

 

10 REPLIES 10
TomMartens
Super User
Super User

Hey @Anonymous ,

 

you need two measures one that formats the value to your liking "0:00:00" (the string).

Then create a 2nd measure that converts the text value into a decimal (Solved: DAX function HH:MM:SS to Decimal Format - Microsoft Power BI Community). Then use the 2nd measure to add conditional formatting to the first measure.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi! @TomMartens 

 

So I did 

= FORMAT('CallData'[AvgTalkTime(Mins)], "Decimal Number")

 

And it stayed the exact same as Text and blurs out the 2nd measure for conditional formatting

Hey @Anonymous ,

 

this converts a text like "h:mm:ss" into a decimal of datatype DOUBLE: 

Time to Decimal = Convert( TIMEVALUE("0:15:00") , DOUBLE )
 
Regards,
Tom


Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hi @TomMartens So I input that as the calculation and it made every value as 0.01

 

However if it is going to make every value as a decimal, is it impossible to conditionally format the way I would like it to be?

Hey @Anonymous ,

 

consider creating a pbix that contains sample data but still reflects your data model (tables, relationships, calculated columns, and measures). Upload the pbix to onedrive or dropbox and share the link. If you are using Excel as a data source instead of using the manual input method, share the xlsx as well.

Describe the expected result based on the sample data you provided.

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hey! @TomMartens Provided is a screenshot of what what I'm using, measures created, and the end goal. 

PrivateAnalytic_0-1655821401640.png

 

TomMartens
Super User
Super User

Hey @Anonymous,

 

can you please explain what you mean by "conditional format" the measure.

 

Do you want to use this measure to control the background color inside a table visual or do you want to control the background based on the values of the above measure.

What visual are using and what conditional formatting are you going to use?

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

Hello Tom! So what I did was create a calculation which will show the average amount of time it takes for folks to answer a phone call: 

Avg Ans Time (Mins) =
VAR hours =
ROUNDDOWN'CallData'[AvgAnsTime] / 3600,0)
VAR minutes =
ROUNDDOWNMOD'CallData'[AvgAnsTime]3600) / 600)
VAR seconds =
INTMOD ('CallData'[AvgAnsTime]60) )
RETURN
FORMAT(hours"0") & ":"
FORMAT(minutes"00") & ":"
FORMAT(seconds"00")
 
With the values of the calculation, I am looking to place them in a table which helps show the amount of time it will take by the time of the day and the date, and I am looking to conditionally format values that are above 15 minutes long. 

 

PrivateAnalytic_1-1655750352308.png

 

Hey @Anonymous ,

 

this part of the measure 

...
FORMAT(hours, "0") & ":"
& FORMAT(minutes, "00") & ":"
& FORMAT(seconds, "00")

Turns the result into a string for this reason you can't the measue to trigger conditional formatting.

You can do the following, create a second measure that represents the time value as a decimal.

Then you can use Conditional formatting based on Rules:

image.png

Select the measure that represents the time as a decimal value and create formatting rules accordingly.

 

Hopefully, this provides what you are looking for and helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Anonymous
Not applicable

So the format is a text. Still makes sense a little why I am unable to conditionally format. What sort of DAX Expression would make it a decimal? Because it should be formatted as "0:00:00"

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.