<?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: Qlik Sense multiple currencies for same item in script - how to correctly format in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492336#M102172</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/167939"&gt;@Gerhard&lt;/a&gt;&amp;nbsp; It is best suited to do it in expression&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=num(Sum(Value),pick(match(Code,'USD','EUR'),'$#,##0.00','€#,##0.00'))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2024 15:19:15 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2024-11-12T15:19:15Z</dc:date>
    <item>
      <title>Qlik Sense multiple currencies for same item in script - how to correctly format</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492309#M102167</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;My data contains items with multiple currencies, I want to display the correct currency symbol in my tables. I want to do the formatting in the script. i.e using num()&lt;/P&gt;
&lt;P&gt;Below is my script. I tried an if statement as below but the problem once it finds EUR for example it formats all values with the EUR format which makes sense.&lt;/P&gt;
&lt;P&gt;Current output - the last row should be formatted with $&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gerhard_0-1731420554096.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/174251i854A7BB90D4549AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gerhard_0-1731420554096.png" alt="Gerhard_0-1731420554096.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;
&lt;P&gt;I also tried mapping the format in a field to my script table, to then use the value in the num() function. But the format option must be a string and I could not get it to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;t:&lt;BR /&gt;load * Inline [&lt;BR /&gt;Item,Code,Value&lt;BR /&gt;1,USD,50&lt;BR /&gt;1,EUR,40&lt;BR /&gt;2,EUR,100&lt;BR /&gt;2,USD,100&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;t2:&lt;BR /&gt;load *,if(Code='EUR',num("Value",'€#,##0.00'),if(Code='USD',num("Value",'$#,##0.00'),Value)) as "New Value";&lt;BR /&gt;Load Item,Code,Value&lt;/P&gt;
&lt;P&gt;resident t;&lt;/P&gt;
&lt;P&gt;drop table t;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 14:15:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492309#M102167</guid>
      <dc:creator>Gerhard</dc:creator>
      <dc:date>2024-11-12T14:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense multiple currencies for same item in script - how to correctly format</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492321#M102168</link>
      <description>&lt;P&gt;It looks like someone may have figured this out in QlikView, does this help:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/How-show-different-currencies-if-I-only-have-my-data-in-one/td-p/1774244" target="_blank"&gt;https://community.qlik.com/t5/QlikView-App-Dev/How-show-different-currencies-if-I-only-have-my-data-in-one/td-p/1774244&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 14:34:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492321#M102168</guid>
      <dc:creator>David_Friend</dc:creator>
      <dc:date>2024-11-12T14:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense multiple currencies for same item in script - how to correctly format</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492333#M102171</link>
      <description>&lt;P&gt;Thanks but this is something very different. They are basically creating the currency code, I already have that - what I struggle with is formatting the value with the appropriate currency symbol. I'll only have one value field in my chart/table.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 15:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492333#M102171</guid>
      <dc:creator>Gerhard</dc:creator>
      <dc:date>2024-11-12T15:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense multiple currencies for same item in script - how to correctly format</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492336#M102172</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/167939"&gt;@Gerhard&lt;/a&gt;&amp;nbsp; It is best suited to do it in expression&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;=num(Sum(Value),pick(match(Code,'USD','EUR'),'$#,##0.00','€#,##0.00'))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 15:19:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492336#M102172</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-11-12T15:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense multiple currencies for same item in script - how to correctly format</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492350#M102174</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;thanks this is a great idea! Even though my value is not an expression but rather a dimension. I've written it as an master measure&amp;nbsp; as below. My table is a dynamic table where the user can select what dimensions/measures to show, what I'll do is force it show the code when the value is made visible thus both will be displayed and it will work. Thanks for your help.&lt;/P&gt;
&lt;P&gt;num([New Value],pick(match(Code,'USD','EUR'),'$#,##0.00','€#,##0.00'))&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 16:19:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-multiple-currencies-for-same-item-in-script-how-to/m-p/2492350#M102174</guid>
      <dc:creator>Gerhard</dc:creator>
      <dc:date>2024-11-12T16:19:59Z</dc:date>
    </item>
  </channel>
</rss>

