<?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: Using firstsortedvalue with aggr and dates in Visualization and Usability</title>
    <link>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720702#M166314</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try below expression then will be appear totals in table&lt;/P&gt;&lt;P&gt;Sum( Aggr(FirstSortedValue(mam_total_enrolled,&amp;nbsp; date),village,Age_category,Gender))&lt;/P&gt;&lt;P&gt;Sum( Aggr(FirstSortedValue(mam_total_enrolled, -date),village,Age_category,Gender))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nitin.&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jun 2020 06:43:58 GMT</pubDate>
    <dc:creator>NitinK7</dc:creator>
    <dc:date>2020-06-22T06:43:58Z</dc:date>
    <item>
      <title>Using firstsortedvalue with aggr and dates</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720363#M166212</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;I need to be able to show enrollment in a programme on the first&amp;nbsp; date in the filtered period as well as the enrollement in the programme on the last date in the filtered period (there are multiple entries for each location). The data has to be displayed by location, gender and age.&lt;/P&gt;&lt;P&gt;I am using the formualas:&lt;/P&gt;&lt;P&gt;FirstSortedValue(mam_total_enrolled,aggr(min(DATE(date)), Gender, Age_category, village))&lt;/P&gt;&lt;P&gt;FirstSortedValue(mam_total_enrolled, - aggr(Max(Date(date)), Gender, Age_category, village))&lt;/P&gt;&lt;P&gt;The first formula seems to work and returns the enrollment from the earliest entry in the reporting period. The second formula however returns the same values as the first formula (the starting enrollment). My understanding is that inserting the - before aggr should return the data from last date in the data set. What formula should I be using to display the final enrollment (from the last day) of the reporting period?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 13:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720363#M166212</guid>
      <dc:creator>alan2</dc:creator>
      <dc:date>2020-06-19T13:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using firstsortedvalue with aggr and dates</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720392#M166221</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;try below expression it is auto aggr in table because of the field&lt;/P&gt;&lt;P&gt;FirstSortedValue(mam_total_enrolled, date).&lt;/P&gt;&lt;P&gt;FirstSortedValue(mam_total_enrolled, -date)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it is work for me.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 14:55:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720392#M166221</guid>
      <dc:creator>NitinK7</dc:creator>
      <dc:date>2020-06-19T14:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using firstsortedvalue with aggr and dates</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720416#M166229</link>
      <description>&lt;P&gt;Thanks NitinK7&lt;/P&gt;&lt;P&gt;Your solution works for me and is much simplier than what I was trying. I guess I was over thinking things.&lt;/P&gt;&lt;P&gt;One follow up question: In the table totals don't appear for Programme enrollment (last 2 lines) which should be the sum of all enrollment of the selected sites. Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 15:30:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720416#M166229</guid>
      <dc:creator>alan2</dc:creator>
      <dc:date>2020-06-19T15:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using firstsortedvalue with aggr and dates</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720702#M166314</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try below expression then will be appear totals in table&lt;/P&gt;&lt;P&gt;Sum( Aggr(FirstSortedValue(mam_total_enrolled,&amp;nbsp; date),village,Age_category,Gender))&lt;/P&gt;&lt;P&gt;Sum( Aggr(FirstSortedValue(mam_total_enrolled, -date),village,Age_category,Gender))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Nitin.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 06:43:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720702#M166314</guid>
      <dc:creator>NitinK7</dc:creator>
      <dc:date>2020-06-22T06:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using firstsortedvalue with aggr and dates</title>
      <link>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720841#M166339</link>
      <description>&lt;P&gt;Hi Nitin&lt;/P&gt;&lt;P&gt;Thanks for the solution. Those formulas do exactly what were expecting.&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 11:43:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Visualization-and-Usability/Using-firstsortedvalue-with-aggr-and-dates/m-p/1720841#M166339</guid>
      <dc:creator>pc-dkn-afg</dc:creator>
      <dc:date>2020-06-22T11:43:04Z</dc:date>
    </item>
  </channel>
</rss>

