<?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: Calculating possible values in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95903#M752971</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have given a sample data.&lt;/P&gt;&lt;P&gt;My formula gives the total correct disc code customers to be 5, but the actual correct discount code customers should be 9.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Oct 2018 11:43:29 GMT</pubDate>
    <dc:creator>snehamahaveer</dc:creator>
    <dc:date>2018-10-11T11:43:29Z</dc:date>
    <item>
      <title>Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95896#M752964</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've been trying to solve this mystery for a while now.&lt;/P&gt;&lt;P&gt;I have a list of customers with their proposed Discount code and their discount codes used at transaction. So my end goal is to find the &lt;SPAN style="font-size: 10pt;"&gt;number of customers by month who have been using the proposed discount code (among multiple transaction discount codes if used). &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;aggr&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;ProposedDiscCode&lt;/SPAN&gt;= &lt;SPAN style="color: #0000ff;"&gt;Concat&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;DISTINCT&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Transaction_Discount_Code&lt;/SPAN&gt;, ','),1,0),&lt;SPAN style="color: #800000;"&gt;Customer&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;Month&lt;/SPAN&gt;,&lt;SPAN style="color: #800000;"&gt;Store&lt;/SPAN&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The above formula helps me identify the number but when the customer uses only the proposed discount code and none others. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&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;Customer&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;ProposedDiscCode&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;Transaction_Discount_Code&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Adam&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;IG&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;IG,IH,IL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Sneha&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;IH&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;IH&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Tim&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;IG&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;IG&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Joe&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;IF&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;IF,IG,IY&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So my formula for the above table of values gives the count as 2, whereas I want 4. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please help me with this. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;S&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95896#M752964</guid>
      <dc:creator>snehamahaveer</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95897#M752965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(If(SubStringCount(Transaction_Discount_Code, ProposedDiscCode) &amp;gt; 0, 1, 0))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:12:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95897#M752965</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-11T11:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95898#M752966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Sum(If(Index(Transaction_Discount_Code, ProposedDiscCode), 1, 0))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:13:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95898#M752966</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-11T11:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95899#M752967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can the expression be enabled to look at distinct transaction discount codes used? because in a month they may have multiple transactions and your formula calculates it at that level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:19:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95899#M752967</guid>
      <dc:creator>snehamahaveer</dc:creator>
      <dc:date>2018-10-11T11:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95900#M752968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure I understand... but may be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(If(SubStringCount(Transaction_Discount_Code, ProposedDiscCode) &amp;gt; 0, 1, 0), Customer, Month, Store))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:23:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95900#M752968</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-11T11:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95901#M752969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It gives the same value as my expression above. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:25:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95901#M752969</guid>
      <dc:creator>snehamahaveer</dc:creator>
      <dc:date>2018-10-11T11:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95902#M752970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to provide a sample where you have Month and Store with expected output from the sample provided?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95902#M752970</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-11T11:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95903#M752971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have given a sample data.&lt;/P&gt;&lt;P&gt;My formula gives the total correct disc code customers to be 5, but the actual correct discount code customers should be 9.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:43:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95903#M752971</guid>
      <dc:creator>snehamahaveer</dc:creator>
      <dc:date>2018-10-11T11:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95904#M752973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If this is how your data is, then try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Count(DISTINCT If(Transaction_Discount_Code = ProposedDiscCode, Customer))&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/215682_Capture.PNG" style="height: 641px; width: 620px;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 11:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95904#M752973</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-11T11:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95905#M752974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This formula works.:) many thanks for helping me so quick.!&lt;/P&gt;&lt;P&gt;However, I fail to understand the logic behind this, can you please help me understand it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 12:36:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95905#M752974</guid>
      <dc:creator>snehamahaveer</dc:creator>
      <dc:date>2018-10-11T12:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating possible values</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95906#M752975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All this is doing is to distinct count customers where &lt;STRONG&gt;Transaction_Discount_Code&lt;/STRONG&gt; = &lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ProposedDiscCode&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Oct 2018 12:57:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-possible-values/m-p/95906#M752975</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-10-11T12:57:48Z</dc:date>
    </item>
  </channel>
</rss>

