<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Conditional Formatting Measure Highlighting Dates in Past and Future in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143336#M187579</link>
    <description>&lt;P&gt;Please try the measure below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Open Color =
VAR _Date    = MAX ( 'Current'[Current OTP] )
VAR _Today   = TODAY ()
RETURN
    SWITCH (
        TRUE (),
        _Date &amp;lt;= _Today,              "#92D050",  
        _Date &amp;lt;= _Today + 60,         "#FFFF99",
        BLANK ()
    )&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 03 Apr 2026 06:29:28 GMT</pubDate>
    <dc:creator>cengizhanarslan</dc:creator>
    <dc:date>2026-04-03T06:29:28Z</dc:date>
    <item>
      <title>Conditional Formatting Measure Highlighting Dates in Past and Future</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143246#M187577</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have a measure created to highlight the date in a table if it's within the next 60 days YELLOW, but it also included today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'd like to do, and can't figure out, is how to make it so that if the date in the column is today's date or before today's date, change the highlight to GREEN, and keep the dates within the next 60 days to stay YELLOW. Anything past 60 days in the future will have no highlight.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my current measure:&lt;/P&gt;&lt;P&gt;&amp;n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gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you for any help!!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 02 Apr 2026 21:02:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143246#M187577</guid>
      <dc:creator>Gandarthvader</dc:creator>
      <dc:date>2026-04-02T21:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting Measure Highlighting Dates in Past and Future</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143263#M187578</link>
      <description>&lt;LI-CODE lang="markup"&gt;Open Color =
var _datediff=DATEDIFF(MAX('Current'[Current OTP]),TODAY(),DAY)
return SWITCH(TRUE(),
_datediff&amp;gt;60,BLANK(),
_datediff&amp;gt;0,"yellow",
_datediff&amp;gt;-60,"green"
 )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Apr 2026 21:37:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143263#M187578</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2026-04-02T21:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting Measure Highlighting Dates in Past and Future</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143336#M187579</link>
      <description>&lt;P&gt;Please try the measure below:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Open Color =
VAR _Date    = MAX ( 'Current'[Current OTP] )
VAR _Today   = TODAY ()
RETURN
    SWITCH (
        TRUE (),
        _Date &amp;lt;= _Today,              "#92D050",  
        _Date &amp;lt;= _Today + 60,         "#FFFF99",
        BLANK ()
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Apr 2026 06:29:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143336#M187579</guid>
      <dc:creator>cengizhanarslan</dc:creator>
      <dc:date>2026-04-03T06:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting Measure Highlighting Dates in Past and Future</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143393#M187581</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="902026" data-lia-user-login="Gandarthvader" class="lia-mention lia-mention-user"&gt;Gandarthvader&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Give this a try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date Highlight =
VAR TargetDate = SELECTEDVALUE('YourTable'[YourDateColumn])
VAR TodayDate  = TODAY()

RETURN
SWITCH(
    TRUE(),
    TargetDate &amp;lt;= TodayDate, "#00FF00",        -- GREEN
    TargetDate &amp;gt; TodayDate &amp;amp;&amp;amp; TargetDate &amp;lt;= TodayDate + 60, "#FFFF00",  -- YELLOW
    BLANK()
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: SegoeUI; font-size: 11.25pt; color: black;" lang="en-GB"&gt;&lt;SPAN&gt;--------------------------------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: SegoeUI; font-size: 11.25pt; color: black;" lang="en-GB"&gt;&lt;SPAN&gt;I hope this helps, please give kudos and mark as solved if it does!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: SegoeUI; font-size: 11.25pt; color: black;" lang="en-GB"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: SegoeUI; font-size: 11.25pt;"&gt;&lt;SPAN&gt;Connect with me on&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.linkedin.com/in/alex-ward-30966b4b/" target="_blank"&gt;&lt;SPAN&gt;LinkedIn&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: SegoeUI; font-size: 11.25pt;"&gt;&lt;SPAN&gt;Subscribe to my&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.youtube.com/@AlexTechShed" target="_blank"&gt;&lt;SPAN&gt;YouTube channel&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;for Fabric/Power Platform related content!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2026 12:02:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143393#M187581</guid>
      <dc:creator>wardy912</dc:creator>
      <dc:date>2026-04-03T12:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Formatting Measure Highlighting Dates in Past and Future</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143403#M187583</link>
      <description>&lt;P&gt;Worked like a charm. Thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Apr 2026 12:29:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-Formatting-Measure-Highlighting-Dates-in-Past-and/m-p/5143403#M187583</guid>
      <dc:creator>Gandarthvader</dc:creator>
      <dc:date>2026-04-03T12:29:17Z</dc:date>
    </item>
  </channel>
</rss>

