<?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: if , then sum , with formatting in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936419#M13065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joanna , here is a sample. You can use num() to do the conditional formatting of the measure and have it change on a table row by row basis in the table object, just leave the number formatting on the right to 'auto' . Does this help ?&amp;nbsp; see if you can get a hand written sample working as below, then we can work on the variable syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/107864_Untitled.png" style="height: 295px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/107860_Capture.PNG" style="height: 124px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Dec 2015 15:00:08 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2015-12-02T15:00:08Z</dc:date>
    <item>
      <title>if , then sum , with formatting</title>
      <link>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936416#M13062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I need to dynamically change my formatting depending on the calculation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. only when a certain department number is chosen, it completes a calculation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if (Department = 1, &lt;/P&gt;&lt;P&gt;(num( sum([VALUE])/sum([OUTOF]), $(= chr(39) &amp;amp; $(=$(vFormat)) &amp;amp; chr(39)),&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Percentage calculation&lt;/P&gt;&lt;P&gt;if (Department = 2,&amp;nbsp; (sum([FINALVALUE]), $(= chr(39) &amp;amp; $(=$(vFormat)) &amp;amp; chr(39)&amp;nbsp;&amp;nbsp; //straight number&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot get it to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 12:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936416#M13062</guid>
      <dc:creator>joeybird</dc:creator>
      <dc:date>2015-12-02T12:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: if , then sum , with formatting</title>
      <link>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936417#M13063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your statement is syntactically incorrect (unbalanced parentheses and too many options for the if statement), and an unknown variable (vFormat) so it is hard to help you base on what you have posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide a detailed explanation of what you are trying to achieve, provide the definitions of all variables involved and (best of all) a sample qvw file with representative data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 12:27:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936417#M13063</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-12-02T12:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: if , then sum , with formatting</title>
      <link>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936418#M13064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the vFormat is declared in my data load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set vFormat='if(Only(Format)=' &amp;amp; chr(39) &amp;amp; 'Integer' &amp;amp; chr(39) &amp;amp;',' &amp;amp;chr(39)&amp;amp; '0' &amp;amp; chr(39) &amp;amp; ',' &amp;amp; chr(39) &amp;amp; '#.##%' &amp;amp; chr(39) &amp;amp; ')';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;without the formatting - main aim is for the calculation to work&lt;/P&gt;&lt;P&gt;I have tried just to have this, but this does not work too&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;if (Department = 1, &lt;/P&gt;&lt;P&gt; sum([VALUE])/sum([OUTOF]),&lt;/P&gt;&lt;P&gt;if (Department= 2,&amp;nbsp; sum([FINALVALUE])&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 13:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936418#M13064</guid>
      <dc:creator>joeybird</dc:creator>
      <dc:date>2015-12-02T13:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: if , then sum , with formatting</title>
      <link>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936419#M13065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joanna , here is a sample. You can use num() to do the conditional formatting of the measure and have it change on a table row by row basis in the table object, just leave the number formatting on the right to 'auto' . Does this help ?&amp;nbsp; see if you can get a hand written sample working as below, then we can work on the variable syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/107864_Untitled.png" style="height: 295px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/107860_Capture.PNG" style="height: 124px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 15:00:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/if-then-sum-with-formatting/m-p/936419#M13065</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2015-12-02T15:00:08Z</dc:date>
    </item>
  </channel>
</rss>

