<?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 Passing GetFieldSelections to a variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Passing-GetFieldSelections-to-a-variable/m-p/1623297#M445936</link>
    <description>&lt;P&gt;I have a requirement where I need to pass a value from a filter into a dimension and then have the data sorted using an &amp;nbsp;&amp;gt;= operator.&lt;/P&gt;&lt;P&gt;The data is a&amp;nbsp;Fiscal Year column and if a 2015 value is selected in a filter I need to see only Fiscal Years that are greater than or equal to 2015.&lt;/P&gt;&lt;P&gt;So if I hard code the value 2015 as below, I get the correct results.&lt;/P&gt;&lt;P&gt;=if (FISCAL_YEAR &amp;gt;= 2015, FISCAL_YEAR)&lt;/P&gt;&lt;P&gt;it correctly returns&lt;/P&gt;&lt;P&gt;Fiscal_year&lt;BR /&gt;2015&lt;BR /&gt;2016&lt;BR /&gt;2017&lt;BR /&gt;2018&lt;BR /&gt;2019&lt;BR /&gt;2020&lt;/P&gt;&lt;P&gt;If I create a variable called v_fy with a hardcoded value of 2018&lt;/P&gt;&lt;P&gt;and use&lt;/P&gt;&lt;P&gt;=if (FISCAL_YEAR &amp;gt;= $(V_FY), FISCAL_YEAR)&lt;/P&gt;&lt;P&gt;This also works correctly&lt;/P&gt;&lt;P&gt;Returns&lt;BR /&gt;2018&lt;BR /&gt;2019&lt;BR /&gt;2020&lt;/P&gt;&lt;P&gt;Now the issue is when I assign the v_fy variable with a value of&lt;/P&gt;&lt;P&gt;=GetFieldSelections(FISCAL_YEAR)&lt;/P&gt;&lt;P&gt;and use the same&lt;/P&gt;&lt;P&gt;=if (FISCAL_YEAR &amp;gt;= $(V_fy), FISCAL_YEAR)&lt;/P&gt;&lt;P&gt;I then goto the filter and choose 2015, the only row I will get is:&lt;/P&gt;&lt;P&gt;2015&lt;/P&gt;&lt;P&gt;Why can't I see the other values when I use the GetFieldSelections with a variable?&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2019 15:26:31 GMT</pubDate>
    <dc:creator>markabrom</dc:creator>
    <dc:date>2019-09-12T15:26:31Z</dc:date>
    <item>
      <title>Passing GetFieldSelections to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-GetFieldSelections-to-a-variable/m-p/1623297#M445936</link>
      <description>&lt;P&gt;I have a requirement where I need to pass a value from a filter into a dimension and then have the data sorted using an &amp;nbsp;&amp;gt;= operator.&lt;/P&gt;&lt;P&gt;The data is a&amp;nbsp;Fiscal Year column and if a 2015 value is selected in a filter I need to see only Fiscal Years that are greater than or equal to 2015.&lt;/P&gt;&lt;P&gt;So if I hard code the value 2015 as below, I get the correct results.&lt;/P&gt;&lt;P&gt;=if (FISCAL_YEAR &amp;gt;= 2015, FISCAL_YEAR)&lt;/P&gt;&lt;P&gt;it correctly returns&lt;/P&gt;&lt;P&gt;Fiscal_year&lt;BR /&gt;2015&lt;BR /&gt;2016&lt;BR /&gt;2017&lt;BR /&gt;2018&lt;BR /&gt;2019&lt;BR /&gt;2020&lt;/P&gt;&lt;P&gt;If I create a variable called v_fy with a hardcoded value of 2018&lt;/P&gt;&lt;P&gt;and use&lt;/P&gt;&lt;P&gt;=if (FISCAL_YEAR &amp;gt;= $(V_FY), FISCAL_YEAR)&lt;/P&gt;&lt;P&gt;This also works correctly&lt;/P&gt;&lt;P&gt;Returns&lt;BR /&gt;2018&lt;BR /&gt;2019&lt;BR /&gt;2020&lt;/P&gt;&lt;P&gt;Now the issue is when I assign the v_fy variable with a value of&lt;/P&gt;&lt;P&gt;=GetFieldSelections(FISCAL_YEAR)&lt;/P&gt;&lt;P&gt;and use the same&lt;/P&gt;&lt;P&gt;=if (FISCAL_YEAR &amp;gt;= $(V_fy), FISCAL_YEAR)&lt;/P&gt;&lt;P&gt;I then goto the filter and choose 2015, the only row I will get is:&lt;/P&gt;&lt;P&gt;2015&lt;/P&gt;&lt;P&gt;Why can't I see the other values when I use the GetFieldSelections with a variable?&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 15:26:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-GetFieldSelections-to-a-variable/m-p/1623297#M445936</guid>
      <dc:creator>markabrom</dc:creator>
      <dc:date>2019-09-12T15:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Passing GetFieldSelections to a variable</title>
      <link>https://community.qlik.com/t5/QlikView/Passing-GetFieldSelections-to-a-variable/m-p/1623328#M445938</link>
      <description>I am assuming the Date filter is not on Fiscal year.&lt;BR /&gt;This is happening because qlik filters all values with that year. You will need to use set analysis in your table.&lt;BR /&gt;e.g. Your filter is on orderyear&lt;BR /&gt;Sum( {&amp;lt;OrderYear=,FiscalYear{"&amp;gt;=$(=V_fy)"}&amp;gt;} Sales)</description>
      <pubDate>Thu, 12 Sep 2019 15:57:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Passing-GetFieldSelections-to-a-variable/m-p/1623328#M445938</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-09-12T15:57:27Z</dc:date>
    </item>
  </channel>
</rss>

