<?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 Last_version Filter usage in Incorta in Dashboards &amp; Analytics Discussions</title>
    <link>https://community.incorta.com/t5/dashboards-analytics-discussions/last-version-filter-usage-in-incorta/m-p/2592#M209</link>
    <description>&lt;P&gt;Hi ,&lt;BR /&gt;We are trying to use the Last_version filter in an aggregated table to get the counts of ID's for the last audit date for that ID. (v5.2.2)&lt;BR /&gt;&lt;BR /&gt;This use case is generating some values but they dont seem to make any sense. We are unable to understand the logic that incorta is using to apply this function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As there was limited documentation for the feature, it would be helpful if you could provide more insight on the workings of this filter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rohan&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2022 16:55:37 GMT</pubDate>
    <dc:creator>rohankamath</dc:creator>
    <dc:date>2022-09-09T16:55:37Z</dc:date>
    <item>
      <title>Last_version Filter usage in Incorta</title>
      <link>https://community.incorta.com/t5/dashboards-analytics-discussions/last-version-filter-usage-in-incorta/m-p/2592#M209</link>
      <description>&lt;P&gt;Hi ,&lt;BR /&gt;We are trying to use the Last_version filter in an aggregated table to get the counts of ID's for the last audit date for that ID. (v5.2.2)&lt;BR /&gt;&lt;BR /&gt;This use case is generating some values but they dont seem to make any sense. We are unable to understand the logic that incorta is using to apply this function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As there was limited documentation for the feature, it would be helpful if you could provide more insight on the workings of this filter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rohan&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 16:55:37 GMT</pubDate>
      <guid>https://community.incorta.com/t5/dashboards-analytics-discussions/last-version-filter-usage-in-incorta/m-p/2592#M209</guid>
      <dc:creator>rohankamath</dc:creator>
      <dc:date>2022-09-09T16:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Last_version Filter usage in Incorta</title>
      <link>https://community.incorta.com/t5/dashboards-analytics-discussions/last-version-filter-usage-in-incorta/m-p/2594#M210</link>
      <description>&lt;P&gt;&lt;EM&gt;Sorry misunderstood the question that you were using the lastVersion() function. Please refer to Patrick reply for the correct answer&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.incorta.com/t5/user/viewprofilepage/user-id/493"&gt;@rohankamath&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the lastVersion() filter function as follows:&lt;/P&gt;&lt;H2&gt;Syntax&lt;/H2&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="text"&gt;firstVersion(&amp;lt;type&amp;gt; value, &amp;lt;type&amp;gt; group_by, date order_by)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;value&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;: an Incorta type&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;group_by&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;: an Incorta type&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;order_by&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;date&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Returns&lt;/H3&gt;&lt;P&gt;Type of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;value&lt;/EM&gt;&lt;/P&gt;&lt;H2&gt;Notes&lt;/H2&gt;&lt;P&gt;Returns the last occurrence of a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;value&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;with respect to date (i.e. the order-by parameter). Unless used as a filter, this function must be used inside an&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://docs4.incorta.com/4.5/c-aggregating-functions" target="_blank" rel="noopener"&gt;aggregation function&lt;/A&gt;.&lt;/P&gt;&lt;H2&gt;Example&lt;/H2&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;count(lastVersion(SALES.SALES.AMOUNT_SOLD, SALES.SALES.CUSTOMER_ID, SALES.SALES.AUDIT_DATE))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;more in the doc link:&amp;nbsp;&lt;A href="https://docs4.incorta.com/4.5/c-filter-functions/#example" target="_blank" rel="noopener"&gt;https://docs4.incorta.com/4.5/c-filter-functions/#example&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you want to share sample of your data and screenshot of your analyzer. The result is impacted by the grouping dimensions used in your aggregated table.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 16:05:11 GMT</pubDate>
      <guid>https://community.incorta.com/t5/dashboards-analytics-discussions/last-version-filter-usage-in-incorta/m-p/2594#M210</guid>
      <dc:creator>Prince</dc:creator>
      <dc:date>2022-09-11T16:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Last_version Filter usage in Incorta</title>
      <link>https://community.incorta.com/t5/dashboards-analytics-discussions/last-version-filter-usage-in-incorta/m-p/2596#M212</link>
      <description>&lt;P&gt;Sure Rohan....&lt;/P&gt;&lt;P&gt;If I take this example of source data:&lt;/P&gt;&lt;TABLE border="0" width="348" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="87" height="21"&gt;OrderId&lt;/TD&gt;&lt;TD width="87"&gt;OrderDate&lt;/TD&gt;&lt;TD width="87"&gt;Amount&lt;/TD&gt;&lt;TD width="87"&gt;ProductId&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;1&lt;/TD&gt;&lt;TD&gt;3/1/22&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;1&lt;/TD&gt;&lt;TD&gt;3/2/22&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;2&lt;/TD&gt;&lt;TD&gt;4/4/22&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;3&lt;/TD&gt;&lt;TD&gt;3/1/22&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;3&lt;/TD&gt;&lt;TD&gt;4/2/22&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;3&lt;/TD&gt;&lt;TD&gt;4/3/22&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Think of that table as a record of orders (there are 3 above) that are placed, and then updated over time.&amp;nbsp; I might apply a Last Version filter (or a First Version filter) to retrieve only the "last version" of the order:&lt;/P&gt;&lt;TABLE border="0" width="348" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="87" height="21"&gt;OrderId&lt;/TD&gt;&lt;TD width="87"&gt;OrderDate&lt;/TD&gt;&lt;TD width="87"&gt;Amount&lt;/TD&gt;&lt;TD width="87"&gt;ProductId&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;1&lt;/TD&gt;&lt;TD&gt;3/2/22&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;2&lt;/TD&gt;&lt;TD&gt;4/4/22&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="21"&gt;3&lt;/TD&gt;&lt;TD&gt;4/3/22&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;To do that in Incorta, it would look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PatrickRafferty_0-1662762473693.png" style="width: 999px;"&gt;&lt;img src="https://community.incorta.com/t5/image/serverpage/image-id/1448iFE778B9110FC8FF0/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="PatrickRafferty_0-1662762473693.png" alt="PatrickRafferty_0-1662762473693.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You drag on the "id" field into Individual Filter panel (think of it as the unique key of the result set or the group by), set the Operator to "Last Version" and then drag the Order Date on to the Values (think of it as the criteria by which we select the row that aligns to that unique key).&lt;/P&gt;&lt;P&gt;Hope that helps, this screenshot comes from an Incorta cloud instance if you wanted to take a look.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 15:53:21 GMT</pubDate>
      <guid>https://community.incorta.com/t5/dashboards-analytics-discussions/last-version-filter-usage-in-incorta/m-p/2596#M212</guid>
      <dc:creator>PatrickRafferty</dc:creator>
      <dc:date>2022-09-11T15:53:21Z</dc:date>
    </item>
  </channel>
</rss>

