<?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 GetFieldSelections in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205692#M503465</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have seen a few examples of loading scripts with a "current month" flag and "last year flag" etc, but I do not think it works for my example.&lt;/P&gt;&lt;P&gt;I have "Month" and "Year" set up as list boxes, so that a user can select the date period they want to look at.&lt;/P&gt;&lt;P&gt;I want to add a table that shows "sales current month" vs "sales 12 months ago", based on user selections.&lt;/P&gt;&lt;P&gt;I think it should look something like this, but can't get it to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;({&amp;lt;Month={GetFieldSelections("Month")}, Year={GetFieldSelections("Year")}&amp;gt;} SALES)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Sum ({&amp;lt;Month={GetFieldSelections("Month")}, Year={GetFieldSelections("Year")-1}&amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get sales for Feb 2010 if i type in the following code: Sum ({&amp;lt;Month={"Feb"}, Year={"2010"}&amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;I get the Month value (Feb) returned if I type the following code: GetFieldSelections("Month")&lt;/P&gt;&lt;P&gt;but when I try and combine the 2 into one formula it does not work. Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Apr 2010 11:40:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-04-07T11:40:44Z</dc:date>
    <item>
      <title>GetFieldSelections in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205692#M503465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have seen a few examples of loading scripts with a "current month" flag and "last year flag" etc, but I do not think it works for my example.&lt;/P&gt;&lt;P&gt;I have "Month" and "Year" set up as list boxes, so that a user can select the date period they want to look at.&lt;/P&gt;&lt;P&gt;I want to add a table that shows "sales current month" vs "sales 12 months ago", based on user selections.&lt;/P&gt;&lt;P&gt;I think it should look something like this, but can't get it to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;({&amp;lt;Month={GetFieldSelections("Month")}, Year={GetFieldSelections("Year")}&amp;gt;} SALES)&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Sum ({&amp;lt;Month={GetFieldSelections("Month")}, Year={GetFieldSelections("Year")-1}&amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get sales for Feb 2010 if i type in the following code: Sum ({&amp;lt;Month={"Feb"}, Year={"2010"}&amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;I get the Month value (Feb) returned if I type the following code: GetFieldSelections("Month")&lt;/P&gt;&lt;P&gt;but when I try and combine the 2 into one formula it does not work. Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:40:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205692#M503465</guid>
      <dc:creator />
      <dc:date>2010-04-07T11:40:44Z</dc:date>
    </item>
    <item>
      <title>GetFieldSelections in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205693#M503466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Syntax should look like&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt; Month = {"$(=GetFieldSelections('Month'))"}, Year = {"$(=GetFieldSelections('Year'))"} &amp;gt;} SALES)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;That might work. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Nevertheless, I recommend you to read the following post, which approach is very close to you, in my opinion:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/forums/p/23950/91568.aspx"&gt;set analysis, a field equal to a selection field?&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 11:50:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205693#M503466</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-04-07T11:50:12Z</dc:date>
    </item>
    <item>
      <title>GetFieldSelections in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205694#M503467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Miguel. With your code, plus a check through the link you sent me, I worked it out.&lt;/P&gt;&lt;P&gt;This is how to show sales in the same month last year:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum ({&amp;lt; Month = {&lt;B&gt;&lt;I&gt;"$(=GetFieldSelections("&lt;/I&gt;&lt;/B&gt;Month"))"}, Year = {"&lt;B&gt;&lt;I&gt;$(=GetFieldSelections("Year")-1)&lt;/I&gt;&lt;/B&gt;"} &amp;gt;} SALES)&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 13:13:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205694#M503467</guid>
      <dc:creator />
      <dc:date>2010-04-07T13:13:38Z</dc:date>
    </item>
    <item>
      <title>GetFieldSelections in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205695#M503468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if mulitple years are selected? Is there a way to do that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jun 2010 16:34:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205695#M503468</guid>
      <dc:creator />
      <dc:date>2010-06-02T16:34:31Z</dc:date>
    </item>
    <item>
      <title>GetFieldSelections in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205696#M503469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not quite sure what you mean? In my example, Sales from the currently selected &lt;EM&gt;Year&lt;/EM&gt; &amp;amp; &lt;EM&gt;Month(s)&lt;/EM&gt; are compared to the same period from the previous year (eg Jan'10 vs Jan'09).&lt;/P&gt;&lt;P&gt;If multiple years are selected, what are you trying to compare against?&lt;/P&gt;&lt;P&gt;Eg if the user selects &lt;EM&gt;Month&lt;/EM&gt;=Jan &amp;amp; &lt;EM&gt;Year&lt;/EM&gt;= 2009,2010, what do you want to show in your table?&lt;/P&gt;&lt;P&gt;a) Sales (Jan'09) vs Sales (Jan'10)&lt;/P&gt;&lt;P&gt;b) Sales (Jan'09+Jan'10) vs Sales (Jan'08+Jan'09)&lt;/P&gt;&lt;P&gt;c) Something else?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":monkey_face:"&gt;🐵&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jun 2010 07:42:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205696#M503469</guid>
      <dc:creator />
      <dc:date>2010-06-03T07:42:38Z</dc:date>
    </item>
    <item>
      <title>GetFieldSelections in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205697#M503470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kristen,&lt;/P&gt;&lt;P&gt;Actually there is. Say you want to analyze information from 2009 and 2010. Hardcoded set analysis would look like&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Year = {2009, 2010}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;GetFieldSelections will allow you to do that. The problem is when you need to check for alphanumeric values, say month "jan" and "feb" hardcoded woul look like &lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Month = {'jan', 'feb'}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;The post I referred above is very illustrative on how to do this, regardless the number of values you want to match with. &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jun 2010 08:13:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205697#M503470</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-06-15T08:13:42Z</dc:date>
    </item>
    <item>
      <title>GetFieldSelections in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205698#M503471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have someproblem same like this. Can you guys help.&lt;/P&gt;&lt;P&gt;here is the link&lt;/P&gt;&lt;P&gt;http://community.qlik.com/forums/t/30418.aspx&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sravan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jun 2010 13:56:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/GetFieldSelections-in-set-analysis/m-p/205698#M503471</guid>
      <dc:creator />
      <dc:date>2010-06-16T13:56:38Z</dc:date>
    </item>
  </channel>
</rss>

