<?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: Set Analysis Help in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110086#M7555</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sample attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/217584_Capture.JPG" style="height: 148px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Nov 2018 01:29:53 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-11-06T01:29:53Z</dc:date>
    <item>
      <title>Set Analysis Help</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110084#M7553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I have a retail sales table with transaction number, sales, article code, and promotion name. Each transaction can have multiple articles, and some might be on promotion, some might not. Promotion information and sales information are stored in different rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Transaction No&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Article Code&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Promo Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #0000ff;"&gt;147&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #0000ff;"&gt;P101&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #0000ff;"&gt;$20&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #0000ff;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #0000ff;"&gt;147&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #0000ff;"&gt;P101&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #0000ff;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="text-align: center; color: #0000ff; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$5 off&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;148&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;P101&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;$10&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;148&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;G101&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;$15&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;148&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;G101&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #008080;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="text-align: center; color: #008080; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$5 off&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #993300;"&gt;149&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #993300;"&gt;C123&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #993300;"&gt;$5&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="text-align: center;"&gt;&lt;SPAN style="color: #993300;"&gt;-&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;* Please be noted that the article P101 is on promo for transaction 147 but not for transaction 148.&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I'm trying to do some sales analysis for specific promotions. For example, when I select "$5 off", it will return the article sales on promotion, so $20 (P101 from transaction 147) adding $15 (G101 from transaction 148) - $35 in total. The desired result is illustrated below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="74" style="border: 1px solid #000000; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; height: 74px; width: 320px;" width="318"&gt;&lt;THEAD style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Promotion Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Article Code&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH class="header" style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center; background-position: no-repeat; color: #ffffff; background-color: #6690bc;" valign="middle"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Promo&amp;nbsp; Sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;&lt;TBODY style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;$5 off&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;P101&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;$20&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; text-align: center;"&gt;$5 off&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;G101&lt;/TD&gt;&lt;TD style="border: 1px solid #000000; font-style: inherit; font-family: inherit; text-align: center;"&gt;$15&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;The formula I came up with is like this:&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;sum({&amp;lt;[Transaction No]=p(), [Article Code]=p(), [Promo Name]= &amp;gt;} [Sales])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;It works in most situation, but not in the example I gave - P101 is on promo for transaction 147, but not for transaction 148. With my formula it will return all the possible values of Transaction No and Article Code associated with the selected Promo Name, resulting in a total sales value of $45 instead of $35.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Any suggestions on tackling this problem will be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Thanks,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Shirley&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2018 22:56:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110084#M7553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-05T22:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Help</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110085#M7554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you considered creating a new field which combines Transaction No and Article Code into one field like this...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD [Transaction No],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Article Code],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Sales],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Promo Name],&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt;[Transaction No] &amp;amp; '-' &amp;amp; &lt;SPAN style="font-size: 13.3333px;"&gt;[Article Code] as TransactionArticleKey&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;FROM ....;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;and then use this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Sum({&amp;lt;[&lt;SPAN style="font-size: 13.3333px;"&gt;TransactionArticleKey] = &lt;/SPAN&gt;p([&lt;SPAN style="font-size: 13.3333px;"&gt;TransactionArticleKey]&lt;/SPAN&gt;), [Promo Name]&amp;gt;} [Sales])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 01:04:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110085#M7554</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-06T01:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Help</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110086#M7555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sample attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/217584_Capture.JPG" style="height: 148px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 01:29:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110086#M7555</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-11-06T01:29:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis Help</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110087#M7556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, thanks for the reply! I was hoping to solve the issue via set analysis, but seems like this is the only solution. I have adopted your suggestion and got the correct calculation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2018 16:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-Help/m-p/110087#M7556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-09T16:24:58Z</dc:date>
    </item>
  </channel>
</rss>

