<?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: Trouble applying thousand separators during reload in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2139038#M92585</link>
    <description>&lt;P&gt;Thanks for looking into this&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Something have happened with the script when copying it into a community post and then back into an Qlik application. When I use my original script I get spacing between the value and € sign, but when I use the code snipplet I posted in this thread I get the same result as you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However I don't think this issue is limited to blanks. I get this problem even if I don't use blanks as separator. Using the setup as shown below with _ as thousand separator still leaves out the separator when using money()&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET ThousandSep='_';
SET DecimalSep=',';
SET MoneyFormat='#_##0,00 €;-#_##0,00 €';
SET MoneyThousandSep='_';
SET MoneyDecimalSep=',';&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_0-1700256554899.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120154iFA4D6D6BC5025B9F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vegar_0-1700256554899.png" alt="Vegar_0-1700256554899.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attaching a qlik sense qvf file with the correct blanks that separates the number and the € when using money().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2023 21:33:43 GMT</pubDate>
    <dc:creator>Vegar</dc:creator>
    <dc:date>2023-11-17T21:33:43Z</dc:date>
    <item>
      <title>Trouble applying thousand separators during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2138737#M92547</link>
      <description>&lt;P&gt;I have multiple fields in many application that contains money values. I want to standardize the number and money&amp;nbsp; formats by defining a default setup of our System Variables&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;ThousandSep&lt;/LI&gt;
&lt;LI&gt;DecimalSep&lt;/LI&gt;
&lt;LI&gt;MoneyFormat&lt;/LI&gt;
&lt;LI&gt;MoneyThousandSep&lt;/LI&gt;
&lt;LI&gt;MoneyDecimalSep&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;When running the script I only get to apply the decimal separators and the currency symbol, I don't get the thousand separators be applied on money() nor num() formating.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know if there is something that I've missed, missunderstood or if this is a bug.&lt;/P&gt;
&lt;P&gt;I use this script.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET ThousandSep=' ';
SET DecimalSep=',';
SET MoneyFormat='# ##0,00 €;-# ##0,00 €';
SET MoneyThousandSep=' ';
SET MoneyDecimalSep=',';

Source:
LOAD 
	num(round(rand() * 10000, '0.001')) as Value
AutoGenerate 10;

LOAD	
	Value,
	money(Value)					as Money,
	text(money(Value)) 				as Money_text,
	money(Value, '$(MoneyFormat)') 	as Money_moneyformat,
	num(Value)						as Num
Resident Source;

drop table Source;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I expect my new field Money and Money_moneyformat to both have this format:&amp;nbsp;'#&amp;nbsp;##0,00 €;-#&amp;nbsp;##0,00 €'&lt;/P&gt;
&lt;P&gt;But when i run my script the thousand separator is not applied to the Money field, only the decimal separator and the currency symbol, but the Money_moneyformat is correct.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if I wrap text() around my Money calculation I do get the correct format, but the value is stored as a string. This implies that the format is there during the script reload, but is lost before being presented in the application.&lt;/P&gt;
&lt;P&gt;See output of my script below (with comments)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Vegar_0-1700214729494.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120083iBC50754D0FC98820/image-size/large?v=v2&amp;amp;px=999" role="button" title="Vegar_0-1700214729494.png" alt="Vegar_0-1700214729494.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Do you guys get the same behavior from the thousand separators if you run my script? Do you know how to fix it so that the separator is applied automatically during reloads&amp;nbsp;? Or do you know any documentation saying this is how it supposed be?&lt;/STRONG&gt;&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 09:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2138737#M92547</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2023-11-17T09:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble applying thousand separators during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2138895#M92578</link>
      <description>&lt;P&gt;Hi, you can use&amp;nbsp;Money#(Money(Value)) as Money. It will give same result as&amp;nbsp;Money_moneyformat field.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 15:12:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2138895#M92578</guid>
      <dc:creator>Anushkaa</dc:creator>
      <dc:date>2023-11-17T15:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble applying thousand separators during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2138951#M92581</link>
      <description>&lt;P&gt;I get the same results as you. I believe this is a long outstanding bug (from QV days) that I never dug into until your post.&amp;nbsp; But I do recall having to use the Money(value,format) form and never understood why.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it looks like the issue is when default format is used in Money(), i.e., no second parameter, spaces are removed from the MoneyFormat format string when it is stored with the field.&amp;nbsp; In my "Money" field results the space between the last digit and the euro symbol is missing. It doesn't appear that way in your image, maybe you can double check.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rwunderlich_0-1700243839766.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120115iE438EBC4AD76EC69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rwunderlich_0-1700243839766.png" alt="rwunderlich_0-1700243839766.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Money() does not create an explicit dual, but rather stores the format with the field and applies it at display time. Looking at both fields using QSDA Pro, I can see that the format mask stored with the "Money" field is missing spaces whereas the "Money_moneyformat" field does have spaces.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rwunderlich_1-1700244785914.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120116iACBB2BCBA809FCC4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rwunderlich_1-1700244785914.png" alt="rwunderlich_1-1700244785914.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rwunderlich_2-1700244808321.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120117i52DDBF60C32272F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rwunderlich_2-1700244808321.png" alt="rwunderlich_2-1700244808321.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/239454"&gt;@Anushkaa&lt;/a&gt;&amp;nbsp;suggestion of&amp;nbsp;&lt;SPAN&gt;Money#(Money(Value)) is a workaround in that it creates an explicit dual at the cost of increasing the storage required for the field.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rwunderlich_3-1700245126553.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120118i96AD09B3E5DCB883/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rwunderlich_3-1700245126553.png" alt="rwunderlich_3-1700245126553.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://qlikviewcookbook.com/2017/03/dual-storage-vs-dual-behavior/" target="_blank" rel="noopener"&gt;https://qlikviewcookbook.com/2017/03/dual-storage-vs-dual-behavior/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The issue is probably worth pursuing as a bug or a doc clarification.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank" rel="noopener"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank" rel="noopener"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank" rel="noopener"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 18:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2138951#M92581</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2023-11-17T18:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble applying thousand separators during reload</title>
      <link>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2139038#M92585</link>
      <description>&lt;P&gt;Thanks for looking into this&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;Something have happened with the script when copying it into a community post and then back into an Qlik application. When I use my original script I get spacing between the value and € sign, but when I use the code snipplet I posted in this thread I get the same result as you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However I don't think this issue is limited to blanks. I get this problem even if I don't use blanks as separator. Using the setup as shown below with _ as thousand separator still leaves out the separator when using money()&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET ThousandSep='_';
SET DecimalSep=',';
SET MoneyFormat='#_##0,00 €;-#_##0,00 €';
SET MoneyThousandSep='_';
SET MoneyDecimalSep=',';&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_0-1700256554899.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/120154iFA4D6D6BC5025B9F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Vegar_0-1700256554899.png" alt="Vegar_0-1700256554899.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am attaching a qlik sense qvf file with the correct blanks that separates the number and the € when using money().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 21:33:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Trouble-applying-thousand-separators-during-reload/m-p/2139038#M92585</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2023-11-17T21:33:43Z</dc:date>
    </item>
  </channel>
</rss>

