<?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: Power BI: Showing latest 3 dates for a group in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927560#M96243</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;FilterMeasure =&lt;BR /&gt;VAR CurrentDate =&lt;BR /&gt;SELECTEDVALUE ( 'Table'[Date] )&lt;BR /&gt;VAR CurrentStatus =&lt;BR /&gt;SELECTEDVALUE ( 'Table'[Status] )&lt;BR /&gt;VAR T1 =&lt;BR /&gt;CALCULATETABLE ( VALUES ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )&lt;BR /&gt;VAR T2 =&lt;BR /&gt;TOPN ( 3, T1, 'Table'[Date], ASC )&lt;BR /&gt;RETURN&lt;BR /&gt;IF ( CurrentStatus = "Completed", IF ( CurrentDate IN T2, 1 ), 1 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;place this measure in the filter pane of the visual and select "is not blank" then spply the filter&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2022 16:07:54 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2022-11-24T16:07:54Z</dc:date>
    <item>
      <title>Power BI: Showing latest 3 dates for a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927317#M96229</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a problem. I want to show the latest 3 dates &lt;U&gt;only&lt;/U&gt; for status "Completed" as illustrated bellow. Tried rankx, topN value and max values approaches, but didn't work out. Basically I need to return the 3 most recent dates&lt;U&gt;&lt;STRONG&gt; just&lt;/STRONG&gt;&lt;/U&gt; for "Completed" along with any number of results for "Overdue" and "Future" (e.g. regardless of the number of their dates for the latter). &lt;U&gt;A measure must be generated&lt;/U&gt;. Any solutions will be highly appreciated.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks, KGeorge&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 15:38:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927317#M96229</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-24T15:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI: Showing latest 3 dates for a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927435#M96238</link>
      <description>&lt;P&gt;try to create a new table with the code below:&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;Table1&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TableName&lt;/SPAN&gt;&lt;SPA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tried and it worked like this:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 24 Nov 2022 14:57:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927435#M96238</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2022-11-24T14:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI: Showing latest 3 dates for a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927499#M96242</link>
      <description>&lt;P&gt;Thank you very much for the response, I haven't specified that I need a measure , where the top 3 "Completed" will be shown along with the other status "Overdue","Future", regardless of both numbers of results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 15:34:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927499#M96242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-24T15:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI: Showing latest 3 dates for a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927560#M96243</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;FilterMeasure =&lt;BR /&gt;VAR CurrentDate =&lt;BR /&gt;SELECTEDVALUE ( 'Table'[Date] )&lt;BR /&gt;VAR CurrentStatus =&lt;BR /&gt;SELECTEDVALUE ( 'Table'[Status] )&lt;BR /&gt;VAR T1 =&lt;BR /&gt;CALCULATETABLE ( VALUES ( 'Table'[Date] ), ALLSELECTED ( 'Table' ) )&lt;BR /&gt;VAR T2 =&lt;BR /&gt;TOPN ( 3, T1, 'Table'[Date], ASC )&lt;BR /&gt;RETURN&lt;BR /&gt;IF ( CurrentStatus = "Completed", IF ( CurrentDate IN T2, 1 ), 1 )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;place this measure in the filter pane of the visual and select "is not blank" then spply the filter&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 16:07:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927560#M96243</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-11-24T16:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI: Showing latest 3 dates for a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927924#M96256</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A showcase of powerful Excel formula,&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 20:18:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2927924#M96256</guid>
      <dc:creator>CNENFRNL</dc:creator>
      <dc:date>2022-11-24T20:18:23Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI: Showing latest 3 dates for a group</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2953569#M98023</link>
      <description>&lt;P&gt;Hello , thank you for you solution. As I specified the main goal is to have a measure with the latest 3 dates for completed; no filter / no ranks ( having anydates) for overdo and future status in one cumulative table. However, I believe your proposition is approaching the final solution of the issue.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;K.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 09:38:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Showing-latest-3-dates-for-a-group/m-p/2953569#M98023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-12-07T09:38:12Z</dc:date>
    </item>
  </channel>
</rss>

