<?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 Problem with Num and Relative expressions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398697#M148403</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 am getting through a very strange issue with Qlikview. Let's see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform a calculation like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If (myVariable = 1, num(sum(something), '#.##0,0'), num(sum(something_else), '#.##0,00'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've written that expression, and it's working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I need another expression to be calculated as a relative value (I've checked the Relative checkbox in the Expressions tab, and QV does its job fine). But as soon as I check the Relative checkbox and apply changes, the first expression becomes unformatted: instead of showing one or two decimals, it shows ten or twelve decimal positions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I could uncheck the Relative checkbox and rewrite my expression as "Sum(whatever) / Sum(TOTAL whatever)", but is this normal? Is this any well-known incompatibility between Num function and Relative checkbox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our QV version is 10.0.9282.8 SR4, Windows 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Sep 2012 07:38:21 GMT</pubDate>
    <dc:creator>ramonarcusa36</dc:creator>
    <dc:date>2012-09-12T07:38:21Z</dc:date>
    <item>
      <title>Problem with Num and Relative expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398697#M148403</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 am getting through a very strange issue with Qlikview. Let's see:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to perform a calculation like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If (myVariable = 1, num(sum(something), '#.##0,0'), num(sum(something_else), '#.##0,00'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've written that expression, and it's working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I need another expression to be calculated as a relative value (I've checked the Relative checkbox in the Expressions tab, and QV does its job fine). But as soon as I check the Relative checkbox and apply changes, the first expression becomes unformatted: instead of showing one or two decimals, it shows ten or twelve decimal positions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I could uncheck the Relative checkbox and rewrite my expression as "Sum(whatever) / Sum(TOTAL whatever)", but is this normal? Is this any well-known incompatibility between Num function and Relative checkbox?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our QV version is 10.0.9282.8 SR4, Windows 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2012 07:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398697#M148403</guid>
      <dc:creator>ramonarcusa36</dc:creator>
      <dc:date>2012-09-12T07:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Num and Relative expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398698#M148404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem in QV version 11.20.13206.0 SR13 64-Bit Edition&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 23:51:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398698#M148404</guid>
      <dc:creator />
      <dc:date>2017-03-21T23:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Num and Relative expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398699#M148405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I expect that is because the relative option internally wraps the expression with further calculations.The format statement embedded in the original expression is lost in that calculation, a bit like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Num(.....))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The format in the Num statement will be ignored, and the Sum() will use a generic numerical format because you have not specified a format for the Sum. Set the format for the relative expression in the Properties | Number tab.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 05:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398699#M148405</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-03-22T05:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Num and Relative expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398700#M148406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working with multiple currencies &lt;SPAN style="font-size: 13.3333px;"&gt;so I can not use the standard formatting. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The column I am trying to format is not the one with the relative Checkbox checked.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To handle multiple currencies&amp;nbsp; -&amp;nbsp; any values are passed through vCurrency below to set number of decimal places and the prefix e.g $ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET vCurrency=if([CURRENCY DECIMALS]='0',money($1,[ISO PREFIX]&amp;amp;'#,##0'),money($1,[ISO PREFIX]&amp;amp;'#,##0.##'));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works except for a table containing a column using vCurrency and another column with the relative checkbox checked.&lt;/P&gt;&lt;P&gt;This table&amp;nbsp; is conditional upon a single currency being selected so different currencies are not added together.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the relative checkbox is checked&amp;nbsp; vCurrency appears to be ignored&amp;nbsp; the value appears in standard format, if the relative checkbox is unchecked vCurrency takes effect and the currency prefix and correct number of decimals are displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like Ramon I have worked around the problem by manually calculating the relative value&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; "Sum(whatever) / Sum(TOTAL whatever)"&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Mar 2017 21:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398700#M148406</guid>
      <dc:creator />
      <dc:date>2017-03-22T21:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Num and Relative expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398701#M148407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Set the format for the dynamically formatted expression to Expression Default and st the format for the relative column to % using the Number format.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 04:45:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398701#M148407</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-03-27T04:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Num and Relative expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398702#M148408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks Jonathan&lt;/P&gt;&lt;P&gt;it was already as you suggest&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 22:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398702#M148408</guid>
      <dc:creator />
      <dc:date>2017-03-27T22:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Num and Relative expressions</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398703#M148409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached a simple example of the problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 02:30:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Num-and-Relative-expressions/m-p/398703#M148409</guid>
      <dc:creator />
      <dc:date>2017-03-28T02:30:25Z</dc:date>
    </item>
  </channel>
</rss>

