Forum Discussion
DAX And Conditional Format
- 4 years ago
Hi Anonymous ,
// Calculation error in measure 'CallData'[Conditional Format]: Cannot convert value "::" of type Text to Type number.
Please use 'CallData'[AvgAnsTime] instead of 'CallData'[Avg Ans Time (Mins)].
'CallData'[AvgAnsTime] return a number value but 'CallData'[Avg Ans Time (Mins)] returns a text value, which can't be used in Maths functions.
Try this:
color = IF ( 'CallData'[AvgAnsTime] > ( 15 * 60 ), "#ff0000")Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
I think it is greyed out because you are using the FORMAT function, which Power BI translates to TEXT. I suggest you create an additional "conditional formatting" measure with the desired logic. You could use parts of your measure and wrap it in an if clause where you return 1 if minutes >= 15 else 0. That measure, you should be able to use it in the conditional formatting pane. Also, you could directly color code in the DAX measure, since you need to create a new measure anyway:
Apply conditional table formatting in Power BI - Power BI | Microsoft Docs
Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
- Anonymous4 years agoNot applicable
Hello Tom! So I am a little confused. I am with the desired logic. Would it be like:
Conditional Format =
VAR color = IF('CallData'[Avg Ans Time (Mins)] > "15", "#ff0000", BLANK())
Or would there be more to it?