<?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: Latest entry in the report in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4312205#M171265</link>
    <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403139" data-lia-user-login="PC2022" class="lia-mention lia-mention-user"&gt;PC2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try like:&lt;/P&gt;
&lt;P&gt;measure =&lt;/P&gt;
&lt;P&gt;MAXX(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; TOPN(1, data, data[date]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; data[plannedactivities]&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;</description>
    <pubDate>Tue, 03 Dec 2024 21:11:41 GMT</pubDate>
    <dc:creator>FreemanZ</dc:creator>
    <dc:date>2024-12-03T21:11:41Z</dc:date>
    <item>
      <title>Latest entry in the report</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4312077#M171253</link>
      <description>&lt;P&gt;I have multiple "planned activities" entries in my Dataverse (Project for the Web). On the report i need to indicate the latest entry. How would i do it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 18:34:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4312077#M171253</guid>
      <dc:creator>PC2022</dc:creator>
      <dc:date>2024-12-03T18:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Latest entry in the report</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4312205#M171265</link>
      <description>&lt;P&gt;hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="403139" data-lia-user-login="PC2022" class="lia-mention lia-mention-user"&gt;PC2022&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try like:&lt;/P&gt;
&lt;P&gt;measure =&lt;/P&gt;
&lt;P&gt;MAXX(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; TOPN(1, data, data[date]),&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; data[plannedactivities]&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 21:11:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4312205#M171265</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-12-03T21:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Latest entry in the report</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4314491#M171321</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure how your semantic model looks like, but if you want to approach to this in Power Query Editor to create [latest_flag] column, one of ways is to try something like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&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;LI-CODE lang="markup"&gt;let
    Source = project_source,
    #"Sorted Rows" = Table.Sort(Source,{{"reportingdate", Order.Descending}}),
    #"Grouped Rows" = Table.Group(#"Sorted Rows", {"group"}, {{"latestreportdate", each List.Max([reportingdate]), type nullable date}}),
    Custom1 = Source,
    #"Merged Queries" = Table.NestedJoin(Custom1, {"group"}, #"Grouped Rows", {"group"}, "Custom1", JoinKind.Inner),
    #"Expanded Custom1" = Table.ExpandTableColumn(#"Merged Queries", "Custom1", {"latestreportdate"}, {"Custom1.latestreportdate"}),
    #"Added Custom" = Table.AddColumn(#"Expanded Custom1", "latest_flag", each if [reportingdate] = [Custom1.latestreportdate] then 1 else 0),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"group", "plannedactivities", "reportingdate", "latest_flag"})
in
    #"Removed Other Columns"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or, if you want to approach to this problem by creating calcualted column, please check the below picture and the same attached pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&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;LI-CODE lang="markup"&gt;latest_flag CC =
VAR _group = project_source[group]
VAR _reportdate = project_source[reportingdate]
VAR _flagtable =
    SELECTCOLUMNS (
        FILTER (
            ADDCOLUMNS (
                project_source,
                "@RankByLatest",
                    RANK (
                        SKIP,
                        project_source,
                        ORDERBY ( project_source[reportingdate], DESC ),
                        ,
                        PARTITIONBY ( project_source[group] ),
                        MATCHBY (
                            project_source[group],
                            project_source[plannedactivities],
                            project_source[reportingdate]
                        )
                    )
            ),
            [@RankByLatest] = 1
        ),
        "@group", project_source[group],
        "@latestdate", project_source[reportingdate]
    )
RETURN
    COUNTROWS (
        FILTER ( _flagtable, [@group] = _group &amp;amp;&amp;amp; [@latestdate] = _reportdate )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2024 04:47:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4314491#M171321</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2024-12-05T04:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Latest entry in the report</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4320072#M171511</link>
      <description>&lt;P&gt;This worked! Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 16:43:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Latest-entry-in-the-report/m-p/4320072#M171511</guid>
      <dc:creator>PC2022</dc:creator>
      <dc:date>2024-12-09T16:43:58Z</dc:date>
    </item>
  </channel>
</rss>

