<?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 dual values in variables in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-dual-values-in-variables/m-p/1010025#M14954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok I have solved my problem, wood for the trees...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I needed to tell set analysis to ignore the &lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;FinYearQtrName&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; value, hence my SA looks like this ...&lt;/P&gt;&lt;P&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;count({$&amp;lt;&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;FinYearQtrName,&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FinYearQtrNum={'$(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;vPrev&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;FinQtrNum&lt;/SPAN&gt;)' }&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt;&amp;nbsp; } customer_Id&amp;nbsp; )&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Nov 2015 09:04:23 GMT</pubDate>
    <dc:creator>paul_scotchford</dc:creator>
    <dc:date>2015-11-18T09:04:23Z</dc:date>
    <item>
      <title>Using dual values in variables</title>
      <link>https://community.qlik.com/t5/App-Development/Using-dual-values-in-variables/m-p/1010024#M14953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a dual value in my loaded calendar for a filter (on a qliksense sheet), the dual looks like this ...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080;"&gt;&lt;EM&gt;Note: There are only 4 quarters for the purpose of this question.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;text = &lt;SPAN style="color: #ff0000;"&gt;2015_Q4&lt;/SPAN&gt; number = &lt;SPAN style="color: #ff0000;"&gt;20154&lt;/SPAN&gt; in my loader, as &lt;SPAN style="color: #ff0000;"&gt;dual(&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;FinYearQtrName,&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;FinYearQtrNum)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The filter will show the user a friendly Year/Qtr name i.e. &lt;STRONG&gt;2015_Q1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When the user selects a value from the &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;filter I populate 2 variables predefined in the loader , via...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let &lt;SPAN style="color: #ff0000;"&gt;vMaxFinQtrNum&lt;/SPAN&gt; = '=num(max(FinYearQtrName))'&lt;/P&gt;&lt;P&gt;let &lt;SPAN style="color: #ff6600;"&gt;vPrev&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #ff9900;"&gt;&lt;SPAN style="color: #ff6600;"&gt;FinQtrNum&lt;/SPAN&gt; &lt;/SPAN&gt;= '=&lt;SPAN style="font-size: 13.3333px;"&gt;vMaxFinQtrNum - 1'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user will select for example 2015_Q4 which I can test and show in a KPI object as &lt;STRONG&gt;20154&lt;/STRONG&gt; i.e '&lt;STRONG&gt;2015_Q4&lt;/STRONG&gt;'&lt;/P&gt;&lt;P&gt;I would then expect the value of &lt;SPAN style="color: #ff6600; font-size: 13.3333px;"&gt;vPrev&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #575757;"&gt;&lt;SPAN style="color: #ff6600;"&gt;FinQtrNum&lt;/SPAN&gt; &lt;/SPAN&gt;to be &lt;STRONG&gt;20153&lt;/STRONG&gt; i.e. &lt;STRONG&gt;2015_Q3&lt;/STRONG&gt; , and i can show this in a kpi &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;as correctly calculated , so this part works as desired.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that the value for the previous period &lt;STRONG&gt;20153&lt;/STRONG&gt; is not evaluating in a set analysis based calc ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;count({$&amp;lt; &lt;SPAN style="font-size: 13.3333px;"&gt;FinYearQtrNum={'$(&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;vPrev&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;FinQtrNum&lt;/SPAN&gt;)' }&lt;/SPAN&gt;&amp;gt;&amp;nbsp; } customer_Id&amp;nbsp; )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression returns a 0 , I was expecting for example 1000 for the previous period to the current period selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression to calculate the current period value works as expected for any filter value selected...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count({$&amp;lt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FinYearQtrNum={'$(&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;vMax&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;FinQtrNum&lt;/SPAN&gt;)' }&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;gt;&amp;nbsp; } customer_Id&amp;nbsp; ) r&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;eturns for example 1250.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;So, has anyone seen this before when selecting a value that is dual from a filter and try to use the number part of the &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;selection such as what I am trying to do. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;If the filter is just based on e.g. the number eg. 20154 instead, &lt;EM&gt;which is not visually friendly for &lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;&lt;EM&gt;some users&lt;/EM&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;then the above calcs work fine for this/prev period.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I'm stumped. Clearly I am missing something somewhere.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Any suggestions are appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;This is being developed on a v2.01 QlikSense server .&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Paul&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Nov 2015 09:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-dual-values-in-variables/m-p/1010024#M14953</guid>
      <dc:creator>paul_scotchford</dc:creator>
      <dc:date>2015-11-17T09:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using dual values in variables</title>
      <link>https://community.qlik.com/t5/App-Development/Using-dual-values-in-variables/m-p/1010025#M14954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok I have solved my problem, wood for the trees...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I needed to tell set analysis to ignore the &lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;FinYearQtrName&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; value, hence my SA looks like this ...&lt;/P&gt;&lt;P&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;count({$&amp;lt;&lt;SPAN style="color: #ff0000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;FinYearQtrName,&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;FinYearQtrNum={'$(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;vPrev&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;FinQtrNum&lt;/SPAN&gt;)' }&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;gt;&amp;nbsp; } customer_Id&amp;nbsp; )&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 09:04:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-dual-values-in-variables/m-p/1010025#M14954</guid>
      <dc:creator>paul_scotchford</dc:creator>
      <dc:date>2015-11-18T09:04:23Z</dc:date>
    </item>
  </channel>
</rss>

