<?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: Date only update when refresh in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2768670#M86096</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="201304" data-lia-user-login="ReneMoawad" class="lia-mention lia-mention-user"&gt;ReneMoawad&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to this method and when I type in the equation you provided, the table is not creating, may you please share how you do it?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Sep 2022 02:08:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-09-15T02:08:13Z</dc:date>
    <item>
      <title>Date only update when refresh</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2766266#M85922</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below equation which create a table for last 7 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I would like to know is there any method stop the powerBI calculating the latest "Today" when I open the file?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words when I last updated the file on 13/9, the "today" should stay at 13/9 even when I open the file today(14/9), so that the last 7 days record can align with the data period received during that 7 days.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Equation:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Table = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt; _today = &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;UNION&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ADDCOLUMNS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;CALENDAR&lt;/SPAN&gt;&lt;SPAN&gt;(_TODAY - &lt;/SPAN&gt;&lt;SPAN&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;,_TODAY) , &lt;/SPAN&gt;&lt;SPAN&gt;"FILTER"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"Last 7 Days"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Order"&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;</description>
      <pubDate>Wed, 14 Sep 2022 06:57:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2766266#M85922</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-14T06:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date only update when refresh</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2766402#M85930</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please follow the below steps to create a new table we use it to get the Last Refreshed Date&lt;/P&gt;&lt;P&gt;- Open &lt;STRONG&gt;Transform Data&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Click on &lt;STRONG&gt;New Source&lt;/STRONG&gt; and choose &lt;STRONG&gt;Blank Query&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- Click on &lt;STRONG&gt;Advanced Editor&lt;/STRONG&gt; and insert the below script:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;let&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Source = #table(type table[Date Last Refreshed = datetime], {{DateTime.LocalNow()}})&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;in&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp; &amp;nbsp; Source&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Those steps will create a table with 1 value which is the Last Refreshed Date, change the type of this column to Date&lt;BR /&gt;&lt;BR /&gt;now in your measure, change the below formula&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;_today =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;VAR _today = MAX('LastRefreshedTable'[Date])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This field will only refresh when you Refresh the table "LastRefreshedTable"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 07:37:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2766402#M85930</guid>
      <dc:creator>ReneMoawad</dc:creator>
      <dc:date>2022-09-14T07:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date only update when refresh</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2768670#M86096</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="201304" data-lia-user-login="ReneMoawad" class="lia-mention lia-mention-user"&gt;ReneMoawad&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to this method and when I type in the equation you provided, the table is not creating, may you please share how you do it?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 02:08:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2768670#M86096</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-15T02:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Date only update when refresh</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2768971#M86108</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 05:04:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2768971#M86108</guid>
      <dc:creator>ReneMoawad</dc:creator>
      <dc:date>2022-09-15T05:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: Date only update when refresh</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2769731#M86174</link>
      <description>&lt;P&gt;Thanks! The equation is working, I will further have a test tomorrow to see whether the date will only update on refresh.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 08:55:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Date-only-update-when-refresh/m-p/2769731#M86174</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-15T08:55:13Z</dc:date>
    </item>
  </channel>
</rss>

