<?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: Advanced Date Filtering using DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2114228#M48409</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; can you provide sample data&lt;/P&gt;</description>
    <pubDate>Mon, 04 Oct 2021 15:39:38 GMT</pubDate>
    <dc:creator>smpa01</dc:creator>
    <dc:date>2021-10-04T15:39:38Z</dc:date>
    <item>
      <title>Advanced Date Filtering using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2102658#M47980</link>
      <description>&lt;P&gt;Good day,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data quesry consists of number of Execel files.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query has colunms "SHIP NAME" and "Date of Reports". Some of the "SHIP NAME" repeats various times with different "DATES". While ago I was interested to filter out only latest date lines for visuals and used following measures and custom colums:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1) Max Date = calculate(max('RNA Date of Report'[Date of Report].[Date]), filter('RNA Date of Report', 'RNA Date of Report'[Ships Name]=EARLIER('RNA Date of Report'[Ships Name])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;2)&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;IsLatest = If('RNA Date of Report'[Date of Report].[Date]='RNA Date of Report'[Max Date].[Date],"Latest Audit", "All Audits")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Since there are much more lines in the quesry for the same "SHIPS NAME" - I'm looking for possibility to create filter for previous to last date. Some have 2 lines, but some have 3+ (dates). Any ideas?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Aleks&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Sep 2021 09:45:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2102658#M47980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-28T09:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Date Filtering using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2102914#M47986</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;Can you add a sample of your data and result here?&lt;/P&gt;&lt;P&gt;For the&amp;nbsp;&lt;SPAN&gt;Max Date measure, you can use&amp;nbsp;LASTDATE ('RNA Date of Report'[Date of Report])&lt;BR /&gt;Max Date=LASTDATE ('RNA Date of Report'[Date of Report])&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and then if you want to use that in the other measure, you can add a variable in your measure like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;IsLatest =
VAR _MaxDate =
    CALCULATE (
        LASTDATE ( 'RNA Date of Report'[Date of Report] ),
        ALLEXCEPT ( 'RNA Date of Report', 'RNA Date of Report'[Ships Name] )
    )
RETURN
    IF (
        'RNA Date of Report'[Date of Report] = _MaxDate,
        "Latest Audit",
        "All Audits"
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, please consider&amp;nbsp;&lt;STRONG&gt;accepting&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;it as the solution&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="helvetica"&gt;&lt;SPAN&gt;&lt;STRONG&gt;Appreciate your Kudos&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":victory_hand:"&gt;✌️&lt;/span&gt;&lt;STRONG&gt;!!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Sep 2021 12:28:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2102914#M47986</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-09-28T12:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Date Filtering using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2105103#M48073</link>
      <description>&lt;P&gt;Good day,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thnaks for reply. What I'm looking for is the new measure which will filter out date previous to last. The above one is not helping me, or I;m doing something wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kidn Regards&lt;/P&gt;&lt;P&gt;Aleks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 08:54:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2105103#M48073</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-29T08:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Date Filtering using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2113396#M48382</link>
      <description>&lt;P&gt;Raally looking for solution how to use DAX function to recognize LATEST, Previous Date for each line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use below functions to recognize latest, but cannot progress more ("all audit"s need to be broken down on more conditions)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;1) Max Date = calculate(max('RNA Date of Report'[Date of Report].[Date]), filter('RNA Date of Report', 'RNA Date of Report'[Ships Name]=EARLIER('RNA Date of Report'[Ships Name])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;IsLatest = If('RNA Date of Report'[Date of Report].[Date]='RNA Date of Report'[Max Date].[Date],"Latest Audit", "&lt;U&gt;&lt;EM&gt;All Audits&lt;/EM&gt;&lt;/U&gt;")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any more ideas?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;THnaks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Aleks&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#help needed&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 09:37:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2113396#M48382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-04T09:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Date Filtering using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2114228#M48409</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp; can you provide sample data&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 15:39:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2114228#M48409</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2021-10-04T15:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Advanced Date Filtering using DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2119105#M48562</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 12:49:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Advanced-Date-Filtering-using-DAX/m-p/2119105#M48562</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-06T12:49:32Z</dc:date>
    </item>
  </channel>
</rss>

