I wanted to compare two dates and show font in red when the result is true.
Here’s what I am trying to achieve.
Can some help me understand where i am going wrong
[Measures].[Issue Date IRL 2 Entry]
CASE WHEN DateCompare(
[Measures].[Actual IRL1 Exit Date] > [Measures].[Target IRL1 Exit Date])
THEN
“<span style='color:red>”
END
CASE WHEN --compare two dates
DateCompare(
[Measures].[Actual IRL1 Exit Date],
[Measures].[Target IRL1 Exit Date]
) > 0
THEN --if Actual date > Target date
"<span style='color:red'>" ||
Format([Measures].[Issue Date IRL 2 Entry],'dd mmm yyyy')
|| "</span>"
END
Check out tips and tricks on measure formatting for more examples: