<?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 Year and MonthName function in Set analysis inside List box without any aggregation. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660616#M49551</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hey Zarra,&lt;BR /&gt;&lt;BR /&gt;Can you explain this part&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{"&amp;gt;=$(=makedate(Year(today()),1,1)) &amp;lt;=$(=makedate(Year(today()),12,31))"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;gt;=$(=makedate(Year(today()),1,1 ) gives us 2019/01/01&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;= $(=makedate(Year(today()),12,31)) gives us 2019/12/31&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My understanding is PaymentDate = 2019/01/01&amp;nbsp; 2019/12/31 , how Paymatedate validates the two&amp;nbsp; output.&lt;BR /&gt;Is this how we implement &lt;STRONG&gt;Between function&lt;/STRONG&gt; in qlik sense/qlik view or this is something else?&lt;BR /&gt;&lt;BR /&gt;I experimented below code. but gave me unintended data&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Aggr(Only({&amp;lt;PaymentDate={"&amp;gt;=$(=makedate(Year(today()),1,1)) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt; &amp;lt;=$(=makedate(Year(today()),12,31))"}&amp;gt; } MonthName(PaymentDate)), PaymentDate)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;=Aggr(Only({&amp;lt;PaymentDate={"&amp;gt;=$(=makedate(Year(today()),1,1)) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;and&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp; &amp;lt;=$(=makedate(Year(today()),12,31))"}&amp;gt; } MonthName(PaymentDate)), PaymentDate)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;=Aggr(Only({&amp;lt;PaymentDate={"&amp;gt;=$(=makedate(Year(today()),1,1)) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/FONT&gt; &amp;lt;=$(=makedate(Year(today()),12,31))"}&amp;gt; } MonthName(PaymentDate)), PaymentDate)&lt;/P&gt;</description>
    <pubDate>Wed, 25 Dec 2019 18:07:00 GMT</pubDate>
    <dc:creator>kalyanamharish</dc:creator>
    <dc:date>2019-12-25T18:07:00Z</dc:date>
    <item>
      <title>Using Year and MonthName function in Set analysis inside List box without any aggregation.</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660603#M49546</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;=if(year(PaymentDate)='2019', Monthname(PaymentDate))&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;I am using above code in a List box . The output of the list box is:-&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Jan 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Feb 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Mar 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Apr 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;May 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jun 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jul 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Aug 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Sep 2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Oct 2019&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Raw data present&amp;nbsp; in PaymentDate field&amp;nbsp; as follows: -&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;01/31/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;02/28/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;03/31/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;04/30/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05/31/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;06/30/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;07/31/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;08/31/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;09/30/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10/31/2019&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/31/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My need, I want to write the same code using Set Expression / Set Analysis and instead of hardcoding the year 2019 i want to make it Dynamic.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;My efforts so far&amp;nbsp; :&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Try 1:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;=Only({&amp;lt;Year(PaymentDate = {"$(=Year(Today()))"})&amp;gt;} MonthName(PaymentDate))&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Try 2:&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;= Aggr(Only({&amp;lt;Year(PaymentDate = {"$(=Year(Today()))"})&amp;gt;} MonthName(PaymentDate)) , MonthName(PaymentDate))&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/EM&gt;I took reference from&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-Creating-Analytics/Set-analysis-without-any-aggregation/td-p/1004149" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-Creating-Analytics/Set-analysis-without-any-aggregation/td-p/1004149&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;Harish&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 19:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660603#M49546</guid>
      <dc:creator>kalyanamharish</dc:creator>
      <dc:date>2024-11-16T19:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using Year and MonthName function in Set analysis inside List box without any aggregation.</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660606#M49547</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe this :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;=Aggr(Only({&amp;lt;PaymentDate={"&amp;gt;=$(=makedate(Year(today()),1,1)) &amp;lt;=$(=makedate(Year(today()),12,31))"}&amp;gt; }  MonthName(PaymentDate)), PaymentDate)	&lt;/LI-CODE&gt;&lt;P&gt;the script is independent of '2019', it looks for the max of the date&lt;/P&gt;&lt;P&gt;the output :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 510px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/26018i510FE1DE91B08410/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;you just have to make sure the date's in the right format.&lt;/P&gt;&lt;P&gt;if you have any hesitation modify your script with this line&lt;/P&gt;&lt;P&gt;Date(Date#(PaymentDate,'MM/DD/YYYY')) as DatePayment,&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2019 15:48:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660606#M49547</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2019-12-25T15:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using Year and MonthName function in Set analysis inside List box without any aggregation.</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660608#M49548</link>
      <description>&lt;P&gt;try this&lt;/P&gt;&lt;P&gt;=monthname(aggr(Only({&amp;lt;Year={"$(=max(Year))"}&amp;gt;}PaymentDate),PaymentDate))&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2019 15:51:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660608#M49548</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2019-12-25T15:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using Year and MonthName function in Set analysis inside List box without any aggregation.</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660609#M49549</link>
      <description>&lt;P&gt;If you don't have Year field in your model. you can use below expression. Bur I would advice to create Year field in model via calendar&lt;/P&gt;&lt;P&gt;=monthname(aggr(Only({&amp;lt;PaymentDate={"&amp;gt;=$(=&lt;STRONG&gt;Date&lt;/STRONG&gt;(yearstart(max(PaymentDate)),&lt;STRONG&gt;'MM/DD/YYYY'&lt;/STRONG&gt;))"}&amp;gt;}PaymentDate),PaymentDate))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make sure that PaymentDat format is applied within set analysis are same else set analysis won't work. Other Option is to apply Date format in script itself using Date function&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2019 16:03:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660609#M49549</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2019-12-25T16:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using Year and MonthName function in Set analysis inside List box without any aggregation.</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660616#M49551</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hey Zarra,&lt;BR /&gt;&lt;BR /&gt;Can you explain this part&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;{"&amp;gt;=$(=makedate(Year(today()),1,1)) &amp;lt;=$(=makedate(Year(today()),12,31))"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;gt;=$(=makedate(Year(today()),1,1 ) gives us 2019/01/01&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;= $(=makedate(Year(today()),12,31)) gives us 2019/12/31&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My understanding is PaymentDate = 2019/01/01&amp;nbsp; 2019/12/31 , how Paymatedate validates the two&amp;nbsp; output.&lt;BR /&gt;Is this how we implement &lt;STRONG&gt;Between function&lt;/STRONG&gt; in qlik sense/qlik view or this is something else?&lt;BR /&gt;&lt;BR /&gt;I experimented below code. but gave me unintended data&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Aggr(Only({&amp;lt;PaymentDate={"&amp;gt;=$(=makedate(Year(today()),1,1)) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;,&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt; &amp;lt;=$(=makedate(Year(today()),12,31))"}&amp;gt; } MonthName(PaymentDate)), PaymentDate)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;=Aggr(Only({&amp;lt;PaymentDate={"&amp;gt;=$(=makedate(Year(today()),1,1)) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;and&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp; &amp;lt;=$(=makedate(Year(today()),12,31))"}&amp;gt; } MonthName(PaymentDate)), PaymentDate)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;=Aggr(Only({&amp;lt;PaymentDate={"&amp;gt;=$(=makedate(Year(today()),1,1)) &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;or&lt;/STRONG&gt;&lt;/FONT&gt; &amp;lt;=$(=makedate(Year(today()),12,31))"}&amp;gt; } MonthName(PaymentDate)), PaymentDate)&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2019 18:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660616#M49551</guid>
      <dc:creator>kalyanamharish</dc:creator>
      <dc:date>2019-12-25T18:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using Year and MonthName function in Set analysis inside List box without any aggregation.</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660618#M49553</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/11821"&gt;@kalyanamharish&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the script works well for you ?&lt;/P&gt;&lt;P&gt;in the problem statement you look up all months in a list for a given year.&lt;/P&gt;&lt;P&gt;let's assume it's the year 2019&lt;/P&gt;&lt;P&gt;=makedate(Year(today()),1,1 ) gives us 2019/01/01&lt;/P&gt;&lt;P&gt;=makedate(Year(today()),12,31)) gives us 2019/12/31&lt;/P&gt;&lt;P&gt;so,&lt;/P&gt;&lt;PRE&gt;{"&amp;gt;=$(=makedate(Year(today()),1,1)) &amp;lt;=$(=makedate(Year(today()),12,31))"}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in set analysis when we put something between "" means that we search in the field, here [PaymentDate ], the values corresponding to the evaluation between "", i.e. higher than 01/01/2019 and lower 31/12/2019.&lt;/P&gt;&lt;P&gt;so that's exactly what you said.&lt;/P&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;</description>
      <pubDate>Wed, 25 Dec 2019 19:36:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Year-and-MonthName-function-in-Set-analysis-inside-List/m-p/1660618#M49553</guid>
      <dc:creator>Taoufiq_Zarra</dc:creator>
      <dc:date>2019-12-25T19:36:05Z</dc:date>
    </item>
  </channel>
</rss>

