<?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: Set expression behaves unexpected when multiplying with a dimension value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-expression-behaves-unexpected-when-multiplying-with-a/m-p/613900#M226497</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month = {"&amp;lt;=$(=Max(Month))"}, Year = {'$(=Max(Year))'}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Mar 2014 14:38:46 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-03-24T14:38:46Z</dc:date>
    <item>
      <title>Set expression behaves unexpected when multiplying with a dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-behaves-unexpected-when-multiplying-with-a/m-p/613898#M226495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to show all Months' values up to and including the Month that is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for instance when I select 2014 and Feb&amp;nbsp; i should get&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;Jan&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;Feb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 220&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using the following expression:&lt;/P&gt;&lt;P&gt;Sign *&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; [Value Type for Reporting_VTYPE]={'010'},&lt;/P&gt;&lt;P&gt;&amp;nbsp; Version_VERSION=,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Month={"&amp;lt;=$(=max({&amp;lt;Year={$(=max(Year))}&amp;gt;} Month))"},&lt;/P&gt;&lt;P&gt;&amp;nbsp; Quarter=,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Year = {$(=max(Year))}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;gt;}[Sales for the Period_SALES])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the result is :&lt;/P&gt;&lt;P&gt;Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;Feb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 220&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; So only the month selected is shown, and the &amp;lt;= selection seems to have no effect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "Sign" is a field in the datamodel than contains a 1 or minus 1 in order to change the sign depending on the reporting line.&lt;/P&gt;&lt;P&gt;In my example I would expect it to work because Sign is unambiguously known (I see that when including it as a dimension)&lt;/P&gt;&lt;P&gt;If I leave the "Sign *" part out then the result is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/P&gt;&lt;P&gt;Jan&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -100&lt;/P&gt;&lt;P&gt;Feb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -220&lt;/P&gt;&lt;P&gt;--&amp;gt; the months are ok but the signs are not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, can a calculated set expression not be used in another calculation?&lt;/P&gt;&lt;P&gt;What is the reason behind this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for sharing your view with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rgds,&lt;/P&gt;&lt;P&gt;Wim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 14:30:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-behaves-unexpected-when-multiplying-with-a/m-p/613898#M226495</guid>
      <dc:creator>wdonckers</dc:creator>
      <dc:date>2014-03-24T14:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression behaves unexpected when multiplying with a dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-behaves-unexpected-when-multiplying-with-a/m-p/613899#M226496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sign is your problem &lt;/P&gt;&lt;P&gt;because when you select February&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;all records in jan don't have records in sign field so you need to put sign inside the set expression&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({$&amp;lt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; [Value Type for Reporting_VTYPE]={'010'},&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Version_VERSION=,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Month={"&amp;lt;=$(=max({&amp;lt;Year={$(=max(Year))}&amp;gt;} Month))"},&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Quarter=,&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; Year = {$(=max(Year))}&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; &amp;gt;}[Sales for the Period_SALES]*sign)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 14:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-behaves-unexpected-when-multiplying-with-a/m-p/613899#M226496</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2014-03-24T14:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression behaves unexpected when multiplying with a dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression-behaves-unexpected-when-multiplying-with-a/m-p/613900#M226497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like below...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month = {"&amp;lt;=$(=Max(Month))"}, Year = {'$(=Max(Year))'}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Mar 2014 14:38:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression-behaves-unexpected-when-multiplying-with-a/m-p/613900#M226497</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-03-24T14:38:46Z</dc:date>
    </item>
  </channel>
</rss>

