<?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 conditional sum based on value in the first column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175139#M463891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be create a mapping load to do this in the script.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.learnqlickview.com/a-qlikview-tutorial-mapping-load-in-qlikview/" title="http://www.learnqlickview.com/a-qlikview-tutorial-mapping-load-in-qlikview/"&gt;http://www.learnqlickview.com/a-qlikview-tutorial-mapping-load-in-qlikview/&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use an inline table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Product, Group&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Blue Jeans, Blue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;White Shirt, White&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Black Jeans, Black&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Blue Shirt, Blue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and now use Group as your dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jun 2016 15:44:34 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-06-01T15:44:34Z</dc:date>
    <item>
      <title>How to conditional sum based on value in the first column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175135#M463887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a question regarding conditional sum based on values in the first column. Is it possible through qlikview and if so how should I structure the expression in pivot table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have included a simplified example, the actual data set is more complicated therefore creating a new field of indicator would not be possible. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on this table&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="124" style="border: 1px solid rgb(0, 0, 0); height: 66px; width: 189px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Blue Jeans&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;White Shirt&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Black Jeans&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;30&lt;BR /&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Blue Shirt&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;40&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do an aggregate like below through wildcard search based on the first column (e.g. for Blue&amp;nbsp; Sum all counts that matches wildcard *Blue* )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="103" style="border: 1px solid #000000; width: 188px; height: 105px;" width="186"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Color&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Count&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Blue&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;White&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 08:21:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175135#M463887</guid>
      <dc:creator />
      <dc:date>2016-05-31T08:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to conditional sum based on value in the first column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175136#M463888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be use a calculated dimension -&amp;gt; &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;SubField(Product, ' ', 1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Expression -&amp;gt; &lt;STRONG&gt;Sum(Count)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/126377_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 14:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175136#M463888</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-31T14:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to conditional sum based on value in the first column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175137#M463889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would go with Sunny solution, otherwise you can add a nested "if" with wildmatch as a calculated dimension &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(wildmatch(Product,'*Blue*') =1, 'Blue',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;SPAN style="font-size: 13.3333px;"&gt;wildmatch(Product,'*Black*') =1,'Black',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;SPAN style="font-size: 13.3333px;"&gt;wildmatch(Product,'*White*') =1,'White'&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 May 2016 16:15:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175137#M463889</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2016-05-31T16:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to conditional sum based on value in the first column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175138#M463890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The actual data set is more complicated than my example, the keyword is more diverse and over the place. Following on Ramon's suggestion, is there anyway to do wildcard search but automatically take in the values in column one as the 2nd input in the wildmatch function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 15:30:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175138#M463890</guid>
      <dc:creator />
      <dc:date>2016-06-01T15:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to conditional sum based on value in the first column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175139#M463891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be create a mapping load to do this in the script.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.learnqlickview.com/a-qlikview-tutorial-mapping-load-in-qlikview/" title="http://www.learnqlickview.com/a-qlikview-tutorial-mapping-load-in-qlikview/"&gt;http://www.learnqlickview.com/a-qlikview-tutorial-mapping-load-in-qlikview/&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or use an inline table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * INLINE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Product, Group&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Blue Jeans, Blue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;White Shirt, White&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Black Jeans, Black&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Blue Shirt, Blue&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and now use Group as your dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jun 2016 15:44:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175139#M463891</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-01T15:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to conditional sum based on value in the first column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175140#M463892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with Sunny on this, it is better to add something this complex to the script instead of the front end, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try using &lt;SPAN class="Bold"&gt;MapSubstring to create a key between this field and the keywords&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jun 2016 21:19:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175140#M463892</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2016-06-02T21:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to conditional sum based on value in the first column</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175141#M463893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the help guys, will look into this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;William&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2016 04:46:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-conditional-sum-based-on-value-in-the-first-column/m-p/1175141#M463893</guid>
      <dc:creator />
      <dc:date>2016-06-03T04:46:05Z</dc:date>
    </item>
  </channel>
</rss>

