<?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 Calculated expression based on condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-expression-based-on-condition/m-p/180028#M46614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, one question for you:&lt;BR /&gt;&lt;BR /&gt;I can structure a cloud like this:&lt;BR /&gt;Index, Type (i=real data, c=to be calculated), Quantity&lt;BR /&gt;A, i, 100&lt;BR /&gt;A, i, 100&lt;BR /&gt;A, i, 100&lt;BR /&gt;B, i, 200&lt;BR /&gt;C, i, 300&lt;BR /&gt;ZZ, c, null&lt;BR /&gt;YY, c, null&lt;BR /&gt;&lt;BR /&gt;Then I've a table with a structure like this:&lt;BR /&gt;Index, ComponentIndex, Sign&lt;BR /&gt;ZZ, A, +&lt;BR /&gt;ZZ, B, +&lt;BR /&gt;YY, A, +&lt;BR /&gt;YY, B, -&lt;BR /&gt;YY, C, -&lt;BR /&gt;&lt;BR /&gt;Now I want to create a pivot table with:&lt;BR /&gt;DIMENSION = Index&lt;BR /&gt;EXPRESSION = $(VARIABLE_QTY) calculated in this way&lt;BR /&gt; - Sum of the Quantity when Type=i&lt;BR /&gt; - Sum or Minus of the ComponentIndex Quantity when Type=c&lt;BR /&gt;&lt;BR /&gt;Do you know how can I create the VARIABLE_QTY to be used in the pivot table that would show this result?&lt;BR /&gt;A 300&lt;BR /&gt;B 200&lt;BR /&gt;C 300&lt;BR /&gt;YY 500&lt;BR /&gt;YY -200&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Mar 2011 22:51:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-24T22:51:15Z</dc:date>
    <item>
      <title>Calculated expression based on condition</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-expression-based-on-condition/m-p/180028#M46614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, one question for you:&lt;BR /&gt;&lt;BR /&gt;I can structure a cloud like this:&lt;BR /&gt;Index, Type (i=real data, c=to be calculated), Quantity&lt;BR /&gt;A, i, 100&lt;BR /&gt;A, i, 100&lt;BR /&gt;A, i, 100&lt;BR /&gt;B, i, 200&lt;BR /&gt;C, i, 300&lt;BR /&gt;ZZ, c, null&lt;BR /&gt;YY, c, null&lt;BR /&gt;&lt;BR /&gt;Then I've a table with a structure like this:&lt;BR /&gt;Index, ComponentIndex, Sign&lt;BR /&gt;ZZ, A, +&lt;BR /&gt;ZZ, B, +&lt;BR /&gt;YY, A, +&lt;BR /&gt;YY, B, -&lt;BR /&gt;YY, C, -&lt;BR /&gt;&lt;BR /&gt;Now I want to create a pivot table with:&lt;BR /&gt;DIMENSION = Index&lt;BR /&gt;EXPRESSION = $(VARIABLE_QTY) calculated in this way&lt;BR /&gt; - Sum of the Quantity when Type=i&lt;BR /&gt; - Sum or Minus of the ComponentIndex Quantity when Type=c&lt;BR /&gt;&lt;BR /&gt;Do you know how can I create the VARIABLE_QTY to be used in the pivot table that would show this result?&lt;BR /&gt;A 300&lt;BR /&gt;B 200&lt;BR /&gt;C 300&lt;BR /&gt;YY 500&lt;BR /&gt;YY -200&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2011 22:51:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-expression-based-on-condition/m-p/180028#M46614</guid>
      <dc:creator />
      <dc:date>2011-03-24T22:51:15Z</dc:date>
    </item>
  </channel>
</rss>

