<?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 Pick(Match()) is not working properly in assigning a number format in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pick-Match-is-not-working-properly-in-assigning-a-number-format/m-p/1591263#M43416</link>
    <description>&lt;P&gt;Hi, everyone,&lt;/P&gt;&lt;P&gt;I am trying to assign an Pick_match expression in the format paremeters in the num function. This expression is assigned to a variable called vFormat and it gives a format of M (millions), k, (thousands) or normal. The variable vDivision assigns a value of 1,1000 or 1000000 depending on the case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problems is this expression works correctly like this:&lt;/P&gt;&lt;P&gt;NUM(Sum(Measure)/$(vDivision),PICK(MATCH($(vDivision),1000000,1000,1),'#,###.## M','#,###.## k',''))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But not with this format:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NUM(Sum(Measure)/$(vDivision),'$(=$(vFormat))')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NOR $(vFormat), '$(vFormat)',$(=$(vFormat)),'$(=$(vFormat))'&lt;/P&gt;&lt;P&gt;I attach also a qvf file with the example&lt;/P&gt;&lt;P&gt;Thanks in advance for your invaluable support.&lt;/P&gt;&lt;P&gt;P.S. The variables must be defined on a qvs file/script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ImageComparison.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13658iA940F3608B32EECD/image-size/large?v=v2&amp;amp;px=999" role="button" title="ImageComparison.PNG" alt="ImageComparison.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:36:18 GMT</pubDate>
    <dc:creator>julioarriaga</dc:creator>
    <dc:date>2024-11-16T05:36:18Z</dc:date>
    <item>
      <title>Pick(Match()) is not working properly in assigning a number format</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-Match-is-not-working-properly-in-assigning-a-number-format/m-p/1591263#M43416</link>
      <description>&lt;P&gt;Hi, everyone,&lt;/P&gt;&lt;P&gt;I am trying to assign an Pick_match expression in the format paremeters in the num function. This expression is assigned to a variable called vFormat and it gives a format of M (millions), k, (thousands) or normal. The variable vDivision assigns a value of 1,1000 or 1000000 depending on the case.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problems is this expression works correctly like this:&lt;/P&gt;&lt;P&gt;NUM(Sum(Measure)/$(vDivision),PICK(MATCH($(vDivision),1000000,1000,1),'#,###.## M','#,###.## k',''))&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;But not with this format:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NUM(Sum(Measure)/$(vDivision),'$(=$(vFormat))')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;NOR $(vFormat), '$(vFormat)',$(=$(vFormat)),'$(=$(vFormat))'&lt;/P&gt;&lt;P&gt;I attach also a qvf file with the example&lt;/P&gt;&lt;P&gt;Thanks in advance for your invaluable support.&lt;/P&gt;&lt;P&gt;P.S. The variables must be defined on a qvs file/script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ImageComparison.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/13658iA940F3608B32EECD/image-size/large?v=v2&amp;amp;px=999" role="button" title="ImageComparison.PNG" alt="ImageComparison.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:36:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-Match-is-not-working-properly-in-assigning-a-number-format/m-p/1591263#M43416</guid>
      <dc:creator>julioarriaga</dc:creator>
      <dc:date>2024-11-16T05:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pick(Match()) is not working properly in assigning a number format</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-Match-is-not-working-properly-in-assigning-a-number-format/m-p/1591274#M43419</link>
      <description>When you set vFormat in the script, it is evaluating vDivision immediately:&lt;BR /&gt;&lt;BR /&gt;SET vFormat =PICK(MATCH($(vDivision),1000000,1000,1),'#,###.## M','#,###.## k','');&lt;BR /&gt;&lt;BR /&gt;As a result, if you look at the value of vFormat in the Variable overview, you can see it has a hardcoded value rather than a reference to vDivision:&lt;BR /&gt;&lt;BR /&gt;PICK(MATCH(1000,1000000,1000,1),'#,###.## M','#,###.## k','')</description>
      <pubDate>Wed, 12 Jun 2019 22:26:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-Match-is-not-working-properly-in-assigning-a-number-format/m-p/1591274#M43419</guid>
      <dc:creator>msteedle</dc:creator>
      <dc:date>2019-06-12T22:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pick(Match()) is not working properly in assigning a number format</title>
      <link>https://community.qlik.com/t5/App-Development/Pick-Match-is-not-working-properly-in-assigning-a-number-format/m-p/1591759#M43468</link>
      <description>Thank you for your answer. Is there a way of loading a variable inside another variable from a script/qvs file and avoiding the hardcoding of the value?</description>
      <pubDate>Thu, 13 Jun 2019 15:46:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pick-Match-is-not-working-properly-in-assigning-a-number-format/m-p/1591759#M43468</guid>
      <dc:creator>julioarriaga</dc:creator>
      <dc:date>2019-06-13T15:46:58Z</dc:date>
    </item>
  </channel>
</rss>

