Forum Discussion
Condtional Formatting Issue
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
- Anonymous4 years agoNot 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 =ROUNDDOWN( MOD( 'CallData'[AvgAnsTime], 3600) / 60, 0)VAR seconds =INT( MOD ('CallData'[AvgAnsTime], 60) )RETURNFORMAT(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.- TomMartens4 years agoSuper User
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:
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
- Anonymous4 years agoNot 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"