Compare Dates and Show font in red based on result

Hi @Tanu,

You are on the right track. There are a few adjustments to make this work.

  1. Use function DateCompare() to compare two dates. There are more details and example of this function: DateCompare

  2. Date that you would like to show in the red color should be between <span ...> and </span>.

  3. Make sure to set measure formatting to Markdown (Calculated measures and members)

The updated formula might look like this:

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:

Best,
Zane support@eazyBI.com