<?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: Conditionnal formatting of last refresh date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3084555#M107704</link>
    <description>&lt;P&gt;That's what I considered first too. But I can't use my Last refresh table in a dax formula. I can't figure why.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is actualized by a query that marks it =NOW() so it updates everytime the dataset is refreshed.&lt;/P&gt;&lt;P&gt;Any idea why, or how I could sove this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2023 07:41:34 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-02-17T07:41:34Z</dc:date>
    <item>
      <title>Conditionnal formatting of last refresh date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3083651#M107631</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have my last refresh date that show up in a card visual. I would like to conditional format it so it show in red if it is older than 2 hours.&lt;/P&gt;&lt;P&gt;Do you guys know how to do that ? I searched for a bit but it seems nobody ever needed this, or it is so simple nobody ever asked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 16:05:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3083651#M107631</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-16T16:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionnal formatting of last refresh date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3083679#M107635</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My first idea, would be to create a Mesure to calculate the difference between now and that date-time refresh, and to check if it more than 2 hours.&lt;/P&gt;
&lt;P&gt;Example :&lt;/P&gt;
&lt;P&gt;MesureTest =&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; DateToday=&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt; ()&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;LASTDATE&lt;/SPAN&gt;&lt;SPAN&gt; ( TableDate[Date] ) &amp;lt; DateToday, &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;Then you cas use this Mesure for conditionnal formatting.&lt;/P&gt;
&lt;P&gt;Using Rules and if your test mesure = 0 (or 1) then choose color.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let us know if it works&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2023 16:24:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3083679#M107635</guid>
      <dc:creator>AilleryO</dc:creator>
      <dc:date>2023-02-16T16:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionnal formatting of last refresh date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3084555#M107704</link>
      <description>&lt;P&gt;That's what I considered first too. But I can't use my Last refresh table in a dax formula. I can't figure why.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is actualized by a query that marks it =NOW() so it updates everytime the dataset is refreshed.&lt;/P&gt;&lt;P&gt;Any idea why, or how I could sove this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 07:41:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3084555#M107704</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-17T07:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Conditionnal formatting of last refresh date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3087334#M107986</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Get "Last Refreshed Date" via the following link”.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.perficient.com/2022/08/24/how-to-show-last-refresh-date-in-power-bi/" target="_blank"&gt;How to Show Last Refresh Date in Power BI / Blogs / Perficient&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;2. Create measure.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Now = NOW()&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Last Refreshed Date =
MAX('Last Refreshed Date'[Column1])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Color =
var _datediffminute=
DATEDIFF(
    [Last Refreshed Date],[Now],MINUTE)
var _2hour=
60 * 2
return
IF(
    _datediffminute&amp;gt;_2hour,"red","green")&lt;/LI-CODE&gt;
&lt;P&gt;3. Visualizations – Callout value – FX.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;4. Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 07:51:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditionnal-formatting-of-last-refresh-date/m-p/3087334#M107986</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-02-20T07:51:36Z</dc:date>
    </item>
  </channel>
</rss>

