<?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: How to sum with multiple fields with analysis? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200794#M22767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;{$&amp;lt;[Field A] = {"&amp;gt;0"}, [Field B] =&lt;SPAN style="color: #ff0000;"&gt; {'123'}&lt;/SPAN&gt;&amp;gt;}SALES_QUANT&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt; * &lt;SPAN style="color: #ff0000;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;(&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;{$&amp;lt;[Field C] = {"&amp;gt;10"}, [Field D] = &lt;SPAN style="color: #ff0000;"&gt;{'456'}&lt;/SPAN&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SALES_COST&lt;SPAN style="color: #0000ff;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Nov 2016 08:49:08 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2016-11-02T08:49:08Z</dc:date>
    <item>
      <title>How to sum with multiple fields with analysis?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200791#M22764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to add analysis to below expression,&lt;/P&gt;&lt;P&gt;Sum(&lt;SPAN style="font-size: 13.3333px;"&gt;SALES_QUANT*&lt;SPAN style="font-size: 13.3333px;"&gt;SALES_COST&lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to sum with multiple fields with analysis? like below example,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(({$&amp;lt;[Field A] = {"&amp;gt;0"}, [Field B] = "123"&amp;gt;}SALES_QUANT)*(&lt;SPAN style="font-size: 13.3333px;"&gt;{$&amp;lt;[Field C] = {"&amp;gt;10"}, [Field D] = "456"&amp;gt;}&lt;/SPAN&gt;SALES_COST))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Louis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 07:19:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200791#M22764</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-10-31T07:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum with multiple fields with analysis?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200792#M22765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Louise,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not possible to use your expression.&lt;/P&gt;&lt;P&gt;The best way is you create sales_quantity and sales_cost condition field on data load editor.&lt;/P&gt;&lt;P&gt;example :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if( FieldA &amp;gt;0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( FieldB = 123, &lt;SPAN style="font-size: 13.3333px;"&gt;Sales_quantity&lt;/SPAN&gt;)) as Sales_quantity,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;if( FieldC &amp;gt;10,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( FieldD = 456, &lt;SPAN style="font-size: 13.3333px;"&gt;Sales_cost&lt;/SPAN&gt;)) as Sales_cost,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;then in your expression you can use &lt;STRONG&gt;sum(sales_quantity*sales_cost)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;or if you want to put condition in your expression, you can use this script.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;sum(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;if( FieldA &amp;gt;0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( FieldB = 123, &lt;SPAN style="font-size: 13.3333px;"&gt;Sales_quantity&lt;/SPAN&gt;))*&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;if( FieldC &amp;gt;10,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if( FieldD = 456, &lt;SPAN style="font-size: 13.3333px;"&gt;Sales_cost&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;)&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Regards,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 08:29:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200792#M22765</guid>
      <dc:creator>marcohadiyanto</dc:creator>
      <dc:date>2016-11-02T08:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum with multiple fields with analysis?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200793#M22766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not just this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({$&amp;lt;[Field A] = {"&amp;gt;0"}, [Field B] = &lt;SPAN style="color: #ff0000;"&gt;{&lt;/SPAN&gt;123&lt;SPAN style="color: #ff0000;"&gt;}&lt;/SPAN&gt;&amp;gt;}SALES_QUANT*SALES_COST)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 08:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200793#M22766</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-11-02T08:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to sum with multiple fields with analysis?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200794#M22767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum&lt;SPAN style="color: #ff0000;"&gt;(&lt;/SPAN&gt;{$&amp;lt;[Field A] = {"&amp;gt;0"}, [Field B] =&lt;SPAN style="color: #ff0000;"&gt; {'123'}&lt;/SPAN&gt;&amp;gt;}SALES_QUANT&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt; * &lt;SPAN style="color: #ff0000;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;(&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;{$&amp;lt;[Field C] = {"&amp;gt;10"}, [Field D] = &lt;SPAN style="color: #ff0000;"&gt;{'456'}&lt;/SPAN&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SALES_COST&lt;SPAN style="color: #0000ff;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Nov 2016 08:49:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-sum-with-multiple-fields-with-analysis/m-p/1200794#M22767</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-11-02T08:49:08Z</dc:date>
    </item>
  </channel>
</rss>

