<?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: Num( Function not working in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113192#M19044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is indeed setup correctly in the load script, but thank you very much for the advice re:"Money()" - this will be useful for my future multi-currency analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2016 12:30:53 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-08-30T12:30:53Z</dc:date>
    <item>
      <title>Num( Function not working</title>
      <link>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113186#M19038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Morning All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been using the num function without issue in all my Qlik Charts but for some reason I cannot get it to work in the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;STRONG&gt;'LY - ' &amp;amp; &lt;SPAN style="color: #3366ff;"&gt;if&lt;/SPAN&gt; (&lt;SPAN style="color: #3366ff;"&gt;GetCurrentSelections&lt;/SPAN&gt;(&lt;SPAN style="color: #ffcc00;"&gt;Year&lt;/SPAN&gt;)=2016,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3366ff;"&gt;num&lt;/SPAN&gt;(&lt;SPAN style="color: #3366ff;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #ffcc00;"&gt;_YTD_LY&lt;/SPAN&gt;={1}&amp;gt;} &lt;SPAN style="color: #ffcc00;"&gt;[Sales total with VAT]&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;STRONG&gt;/ &lt;SPAN style="color: #3366ff;"&gt;Count(&lt;/SPAN&gt;{&amp;lt;&lt;SPAN style="color: #ffcc00;"&gt;_YTD_LY&lt;/SPAN&gt;={1}&amp;gt;} &lt;SPAN style="color: #3366ff;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="color: #ffcc00;"&gt;[Sales invoice]&lt;/SPAN&gt;), '£#.##'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; text-align: center;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #3366ff;"&gt;num&lt;/SPAN&gt;(&lt;SPAN style="color: #3366ff;"&gt;Sum&lt;/SPAN&gt;({&amp;lt;&lt;SPAN style="color: #ffcc00;"&gt;[Year]&lt;/SPAN&gt;={"$(=&lt;SPAN style="color: #3366ff;"&gt;max&lt;/SPAN&gt;(&lt;SPAN style="color: #ffcc00;"&gt;[Year]&lt;/SPAN&gt;-1))"}&amp;gt;} &lt;SPAN style="color: #ffcc00;"&gt;[Sales total with VAT]&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px; text-align: center;"&gt;&lt;STRONG&gt;/ &lt;SPAN style="color: #3366ff;"&gt;Count(&lt;/SPAN&gt;{&amp;lt;&lt;SPAN style="color: #ffcc00;"&gt;[Year]&lt;/SPAN&gt;={"$(=&lt;SPAN style="color: #3366ff;"&gt;max&lt;/SPAN&gt;(&lt;SPAN style="color: #ffcc00;"&gt;[Year]&lt;/SPAN&gt;-1))"}&amp;gt;} &lt;SPAN style="color: #3366ff;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="color: #ffcc00;"&gt;[Sales invoice]&lt;/SPAN&gt;), '£#.##'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;This does not format the number at all. As a result, instead of £15.42 I instead have 15.419583493 (for example). Also, if it helps, this is under the Subtitle field in Qlik Sense.&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;I appreciate any assistance you can give me with regards to this issue.&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;Thank you in advance.&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;Kind regards,&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 10:32:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113186#M19038</guid>
      <dc:creator />
      <dc:date>2016-08-30T10:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Num( Function not working</title>
      <link>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113187#M19039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try putting the num on the outside of the if statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 11:08:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113187#M19039</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-08-30T11:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Num( Function not working</title>
      <link>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113188#M19040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you seem to have an extra comma "," within your IF statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'LY - ' &amp;amp; &lt;/P&gt;&lt;P&gt;if (GetCurrentSelections(Year)=2016&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,num(Sum({&amp;lt;_YTD_LY={1}&amp;gt;} [Sales total with VAT])/Count({&amp;lt;_YTD_LY={1}&amp;gt;} DISTINCT [Sales invoice]), '£#.##')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,num(Sum({&amp;lt;[Year]={"$(=max([Year]-1))"}&amp;gt;} [Sales total with VAT])/Count({&amp;lt;[Year]={"$(=max([Year]-1))"}&amp;gt;} DISTINCT [Sales invoice]), '£#.##')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; this one&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 11:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113188#M19040</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2016-08-30T11:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Num( Function not working</title>
      <link>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113189#M19041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is pound £ your currency format in the application?&lt;/P&gt;&lt;P&gt;If so, I would suggest that you confirm the money variables in the load script are set according to your preference, for example as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14725551273098897" jivemacro_uid="_14725551273098897" modifiedtitle="true"&gt;
&lt;P&gt;SET MoneyThousandSep=',';&lt;/P&gt;
&lt;P&gt;SET MoneyDecimalSep='.';&lt;/P&gt;
&lt;P&gt;SET MoneyFormat='£#,##.00;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;£-#,##.00&lt;/SPAN&gt;';&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Being currency, you then us the Money() format function. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14725553952376461" jivemacro_uid="_14725553952376461" modifiedtitle="true"&gt;
&lt;P&gt;'LY - ' &amp;amp; if( GetCurrentSelections(Year)=2016,&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Money(Sum({&amp;lt;_YTD_LY={1}&amp;gt;} [Sales total with VAT]) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 12pt;"&gt;/ Count({&amp;lt;_YTD_LY={1}&amp;gt;} DISTINCT [Sales invoice]) ),&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 12pt;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Money(Sum({&amp;lt;[Year]={"$(=max([Year]-1))"}&amp;gt;} [Sales total with VAT])&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;/Count({&amp;lt;[Year]={"$(=max([Year]-1))"}&amp;gt;} DISTINCT [Sales invoice]))&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 11:11:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113189#M19041</guid>
      <dc:creator>ToniKautto</dc:creator>
      <dc:date>2016-08-30T11:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Num( Function not working</title>
      <link>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113190#M19042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this worked. It seems so obvious now!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 12:29:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113190#M19042</guid>
      <dc:creator />
      <dc:date>2016-08-30T12:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: Num( Function not working</title>
      <link>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113191#M19043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My apologies, this is part of a larger expression and was poorly edited.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 12:30:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113191#M19043</guid>
      <dc:creator />
      <dc:date>2016-08-30T12:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Num( Function not working</title>
      <link>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113192#M19044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is indeed setup correctly in the load script, but thank you very much for the advice re:"Money()" - this will be useful for my future multi-currency analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2016 12:30:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Num-Function-not-working/m-p/1113192#M19044</guid>
      <dc:creator />
      <dc:date>2016-08-30T12:30:53Z</dc:date>
    </item>
  </channel>
</rss>

