<?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 analysis, dynamic number formatting and commas in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284966#M460945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you guys for your answers. Looks like I won't get it my way &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll use a workaround solution by dividing my expression by a variable that's equal to 1, 1000 or 1000000. The only issue is that I won't have a digit for when I want millions but I can't see any other easy solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you also confirm that there is no workaround using the &lt;STRONG&gt;Round()&lt;/STRONG&gt; function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Mar 2017 08:42:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-03-15T08:42:48Z</dc:date>
    <item>
      <title>Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284958#M460937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am working with pivot and straight tables and need to be able to dynamically change to number format, e.g. there is a slider allowing the user to switch from € to k€ (thousand) and then to M€ (million). The € symbol is not needed but makes it easier to understand my need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have achieved this by following the instructions in this thread (&lt;A href="https://community.qlik.com/thread/173030"&gt;Dynamically changing number formats?&lt;/A&gt;) and it works wonderfully until I mix some set analysis in it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far, I have created a variable in script that looks like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;SET vScaleNumber=if(vSlider=1, num($1/1000000,'# ##0,0')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,if(&lt;SPAN style="font-size: 13.3333px;"&gt;vSlider&lt;/SPAN&gt;=2, num($1/1000,'# ##0')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,num($1,'# ##0')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is intended to show one digit only when in million mode and none otherwise. There is a slider allowing the user to change the variable vSlider from 1 to 3 and letting him chose how he wants to display the numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my tables, I can use it like :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$(vScaleNumber(sum({&amp;lt;unit={'AA'}&amp;gt;} sales)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and it works how it should. But as soon as I add an parameter to my set analysis (&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;$(vScaleNumber(sum({&amp;lt;unit={'AA'},&lt;SPAN style="font-size: 13.3333px;"&gt;Country={'BB'}&lt;/SPAN&gt;&amp;gt;} sales)))&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp; ), it won't work anymore. I carefully read this thread ( &lt;A href="https://community.qlik.com/docs/DOC-2945"&gt;Comma problem (,) workaround for dollar sign expansion with parameters&lt;/A&gt; ) but can't make it work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, I have stored most of my set analysis in variables so that I have a variable &lt;STRONG&gt;vSetAna1&lt;/STRONG&gt; that looks like &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;unit={'AA'},&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Country={'BB'}&lt;/STRONG&gt;&lt;/SPAN&gt; which I should be able to use in an expression like &lt;STRONG&gt;$(vScaleNumber(sum({&amp;lt;$(vSetAna1)&amp;gt;} sales)))&lt;/STRONG&gt; which does only work when there is no comma in my set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the end, I also might want to mix set analysis stored in multiple set analysis so that my expression looks like &lt;STRONG style="font-size: 13.3333px;"&gt;$(vScaleNumber(sum({&amp;lt;$(vSetAna1),&lt;STRONG style="font-size: 13.3333px;"&gt;$(vSetAna2)&lt;/STRONG&gt;&amp;gt;} sales)))&lt;/STRONG&gt; or &lt;STRONG style="font-size: 13.3333px;"&gt;$(vScaleNumber(sum({&amp;lt;$(vSetAna1)&amp;gt;+&amp;lt;&lt;STRONG style="font-size: 13.3333px;"&gt;$(vSetAna2)&lt;/STRONG&gt;&amp;gt;} sales)))&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would welcome any help to solve my issue and if need be, I can try to provide a .qvw example &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS : My issue is not particularly related to number formatting so if you come up with a better title, I'll change it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 09:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284958#M460937</guid>
      <dc:creator />
      <dc:date>2017-03-14T09:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284959#M460938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A qvw example might help us to play around with it, so I think providing one would be a good idea &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 10:24:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284959#M460938</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-14T10:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284960#M460939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As per your request, you will find an example attached. I hope it is good enough. There are 4 expressions in my table and the fourth is the one that I'm having trouble with.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:31:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284960#M460939</guid>
      <dc:creator />
      <dc:date>2017-03-14T11:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284961#M460940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;regarding the number formatting, I used this extensively and from memory it doesn't like set analysis, you need to store the formula with the set analysis as another variable and use this &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:33:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284961#M460940</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-14T11:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284962#M460941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually looking at it again, I don't think I ever got it to work, I had to just use the if statement in the expression if I needed to use set analysis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:41:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284962#M460941</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-14T11:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284963#M460942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ might be able to work some aggr magic to make this work, but I can't find the right syntax&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:46:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284963#M460942</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-14T11:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284964#M460943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nope, can't get it to work &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:52:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284964#M460943</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-14T11:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284965#M460944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as it's not just me then! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm pretty sure that was the conclusion I came to before I am afraid, however the number formatting formula itself is great, but not ideal when you use it within an expression as you need to update all expressions with any changes which kind of defeats the point!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284965#M460944</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2017-03-14T11:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284966#M460945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you guys for your answers. Looks like I won't get it my way &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll use a workaround solution by dividing my expression by a variable that's equal to 1, 1000 or 1000000. The only issue is that I won't have a digit for when I want millions but I can't see any other easy solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you also confirm that there is no workaround using the &lt;STRONG&gt;Round()&lt;/STRONG&gt; function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 08:42:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284966#M460945</guid>
      <dc:creator />
      <dc:date>2017-03-15T08:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284967#M460946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is unfortunately no way to mask a comma within a variable-parameter but there are more or less expensive ways to bypass this limitation. Most common would be to use a different char for it and to replace it within the variable-call per $-sign expansion whereby this might be not enough because possible single-quotes within the string will cause further challenges and needs also to be replaced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With this in mind you could create the expression-variable like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(vSlider=1, num($(=replace(replace('$1', ';', ','), '#', chr(39)))/1000000,'# ##0,0')&lt;/P&gt;&lt;P&gt;,if(vSlider=2, num($(=replace(replace('$1', ';', ','), '#', chr(39)))/1000,'# ##0')&lt;/P&gt;&lt;P&gt;,num($(=replace(replace('$1', ';', ','), '#', chr(39))),'# ##0')))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and a parameter-variable like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unit={#AA#};colour={#yellow#}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and you will get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/156345_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Mar 2017 12:19:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284967#M460946</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-03-15T12:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284968#M460947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Marcus, that worked like a charm, even with nested variables (like &lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;vSetAna1 = &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;unit={&lt;SPAN style="font-size: 13.3333px;"&gt;$(=vFilterUnit)}&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;Country=&lt;SPAN style="font-size: 13.3333px;"&gt;{$(=&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vFilterCountry&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)}&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there other characters beside comma and single/double quotes that need to be replaced? Though I haven't encountered one yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since it is also semi-related, I want to store my variables somewhere because it is quite tedious to manage them in the Variable Overview. Do you think Excel is future-proof? Storing them directly in the script seems risky.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 13:25:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284968#M460947</guid>
      <dc:creator />
      <dc:date>2017-03-16T13:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis, dynamic number formatting and commas</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284969#M460948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The # sign could be used by format-functions or to interpret a variable-value but the semi-colon seems to be only used within the script and should therefore not bother the qlik-syntax within expressions. But both chars could be occur within fieldnames, too but if you double the chars like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unit={##AA##};;colour={##yellow##}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and adjusted the replacing appropriate you could minimize the risk that there are such overlappings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course you could also choose some exotic chars from the extended ascii- or even the uni-code-area but they aren't quite convenient by the usage, for example: ╣for ALT+185.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To centralize the variables on an external storage could really help to manage and maintain them. Quite common are include-variables for it or even more convenient would be excel. Further loading the expression-variables per loop from excel avoids problems with $-signs within them. For a how to see here: &lt;A href="http://www.qlikfix.com/2011/09/21/storing-variables-outside-of-qlikview/" title="http://www.qlikfix.com/2011/09/21/storing-variables-outside-of-qlikview/"&gt;http://www.qlikfix.com/2011/09/21/storing-variables-outside-of-qlikview/&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 14:57:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-dynamic-number-formatting-and-commas/m-p/1284969#M460948</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2017-03-16T14:57:56Z</dc:date>
    </item>
  </channel>
</rss>

