<?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: Problem with firstsortedvalue and set in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386935#M422252</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem is with the first sorted value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Sep 2017 06:24:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-11T06:24:29Z</dc:date>
    <item>
      <title>Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386929#M422246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Geniuses,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to find out that in which month of the current year the lowest invoice processed excluding the current month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the below formula to calculate the number of invoice processed&lt;/P&gt;&lt;P&gt;=min(aggr(num((count(distinct{&amp;lt;YEAR={$(=vYearToday)},&lt;STRONG&gt;MONTH-={$(=vMonthToday)}&lt;/STRONG&gt;&amp;gt;} INVOICE_NUMBER)),'##0'),MONTH))&lt;/P&gt;&lt;P&gt;This is working fine and give me the correct result which is 1952 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want in which month this 1952 is coming from for that I am trying to use the below formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(MONTH,(aggr(num((count(distinct{&amp;lt;YEAR={$(=vYearToday)},&lt;STRONG&gt;MONTH-={$(=vMonthToday)}&lt;/STRONG&gt;&amp;gt;} INVOICE_NUMBER)),'##0'),MONTH))) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this formula as soon as I use the MONTH in the set analysis it is not returning me anything(highlighted in bold), why I am using the MONTH with -= as I want to exclude the current month, please help me out to solve this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vYearToday =Year(today())&lt;/P&gt;&lt;P&gt;vMonthToday&amp;nbsp; =Month(Today())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 05:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386929#M422246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T05:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386930#M422247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FirstSortedValue(MONTH,(aggr(num((count(distinct{&amp;lt;YEAR={$(=vYearToday)},&lt;STRONG&gt;MONTH={"&amp;lt;$(=vMonthToday)"}&lt;/STRONG&gt;&amp;gt;} INVOICE_NUMBER)),'##0'),MONTH)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 05:27:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386930#M422247</guid>
      <dc:creator>shraddha_g</dc:creator>
      <dc:date>2017-09-11T05:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386931#M422248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not working &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 06:05:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386931#M422248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T06:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386932#M422249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check what is variable is returning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Format returned by Variable and that of Values from Month Field Should match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also possible share screen shot of what output you are getting after evaluating the variable and values of Filter Month&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 06:14:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386932#M422249</guid>
      <dc:creator>shraddha_g</dc:creator>
      <dc:date>2017-09-11T06:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386933#M422250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post sample?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know whether this is returning anything for you?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=FirstSortedValue(MONTH, Aggr(count(distinct &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;INVOICE_NUMBER),MONTH))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Then use this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=FirstSortedValue(MONTH, Aggr(count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{&amp;lt;YEAR={$(=vYearToday)},&lt;/SPAN&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;MONTH={"&amp;lt;$($(=vMonthToday))"}&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt;}&lt;/SPAN&gt; distinct &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;INVOICE_NUMBER),MONTH))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 06:19:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386933#M422250</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-09-11T06:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386934#M422251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;attached is the screenshot&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/176054_error.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting no value after putting the formula you gave(left text box shows same), Month is coming as Jan Feb Mar and the vMonthToday variable is returning Sep shown in the right text box&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 06:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386934#M422251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T06:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386935#M422252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem is with the first sorted value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 06:24:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386935#M422252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T06:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386936#M422253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes Anil the first expression returning me Sep,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the expression you gave but it is not returning anything&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the problem is with the firstsortedvalue&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 06:26:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386936#M422253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T06:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386937#M422254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AFAIK, If first one returns some thing then how come FirstSortedValue is wrong. Could be problem with variables? You can work on variables or share sample to test&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 06:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386937#M422254</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-09-11T06:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with firstsortedvalue and set</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386938#M422255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anil I did some analysis and found out that I have two month in which the invoices are the lowest and are exact same as 1952 so the firstsorted value is getting confused to sort it, please tell me now how to tackle such situation&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 07:01:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-firstsortedvalue-and-set/m-p/1386938#M422255</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-11T07:01:39Z</dc:date>
    </item>
  </channel>
</rss>

