<?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: Formula for previous date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659619#M78794</link>
    <description>&lt;P&gt;You could create a measure like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Row is visible =
VAR startDate =
    SWITCH ( WEEKDAY ( TODAY (), 1 ), 2, TODAY () - 3, TODAY () - 1 )
RETURN
    IF ( SELECTEDVALUE ( 'Table'[Received date] ) &amp;gt;= startDate, 1 )&lt;/LI-CODE&gt;&lt;P&gt;and then use that as a filter on your table or matrix visual, to only show when the value is 1&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jul 2022 15:30:43 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2022-07-25T15:30:43Z</dc:date>
    <item>
      <title>Formula for previous date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659598#M78791</link>
      <description>&lt;P&gt;Hi, Thanks for looking at my post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get formula for following logic please.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have "Received Date" column, if today()-1 = Received date then show that row and&amp;nbsp; if today() fall on monday then show received date from friday,sat and sun.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 15:19:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659598#M78791</guid>
      <dc:creator>jimpatel</dc:creator>
      <dc:date>2022-07-25T15:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for previous date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659619#M78794</link>
      <description>&lt;P&gt;You could create a measure like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Row is visible =
VAR startDate =
    SWITCH ( WEEKDAY ( TODAY (), 1 ), 2, TODAY () - 3, TODAY () - 1 )
RETURN
    IF ( SELECTEDVALUE ( 'Table'[Received date] ) &amp;gt;= startDate, 1 )&lt;/LI-CODE&gt;&lt;P&gt;and then use that as a filter on your table or matrix visual, to only show when the value is 1&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 15:30:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659619#M78794</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-07-25T15:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for previous date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659672#M78804</link>
      <description>&lt;P&gt;Thats perfect. Thanks a lot for your help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;One question, why i cannot put measure in the filter? That is i used your formula and i am getting 1 for correct filter. I am thinking of putting filter with 1 and blank, in the report view, but it does not allow me to put the above measure in the filter. Any idea please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 15:50:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659672#M78804</guid>
      <dc:creator>jimpatel</dc:creator>
      <dc:date>2022-07-25T15:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for previous date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659696#M78806</link>
      <description>&lt;P&gt;You can't add measures as filters at the page or report level, only at the visual level.&lt;/P&gt;&lt;P&gt;If you have to have something at the report level then I think that would involve creating a new column in your model.&lt;/P&gt;&lt;P&gt;You could create a new column just to be used for filtering, using either Power Query or DAX, which returned the actual received date unless that date was a Friday or Saturday, in which case it would return the date of the following Sunday. You could then use that new date column as a filter, to only show values for yesterday. Once added to the filter, you could hide the column from the model to avoid confusion with the real received date&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 15:59:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659696#M78806</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-07-25T15:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for previous date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659707#M78807</link>
      <description>&lt;P&gt;Perfect&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 16:05:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2659707#M78807</guid>
      <dc:creator>jimpatel</dc:creator>
      <dc:date>2022-07-25T16:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for previous date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2661074#M78892</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for reopening this post. Formula works great, any idea of how to modify the formula for not showing today's date please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 07:38:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2661074#M78892</guid>
      <dc:creator>jimpatel</dc:creator>
      <dc:date>2022-07-26T07:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for previous date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2661150#M78901</link>
      <description>&lt;P&gt;You could modify it like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Row is visible =
VAR startDate =
    SWITCH ( WEEKDAY ( TODAY (), 1 ), 2, TODAY () - 3, TODAY () - 1 )
RETURN
    IF ( SELECTEDVALUE ( 'Table'[Received date] ) &amp;gt;= startDate &amp;amp;&amp;amp; SELECTEDVALUE('Table'[Received date]) &amp;lt; TODAY(), 1 )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 26 Jul 2022 08:03:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2661150#M78901</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-07-26T08:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Formula for previous date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2661231#M78906</link>
      <description>&lt;P&gt;Perfect. Thanks a lot &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jul 2022 08:24:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Formula-for-previous-date/m-p/2661231#M78906</guid>
      <dc:creator>jimpatel</dc:creator>
      <dc:date>2022-07-26T08:24:24Z</dc:date>
    </item>
  </channel>
</rss>

