<?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 Problem with alt states in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-alt-states-in-set-analysis/m-p/1157983#M519775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a simple database (simple but with milions of rows) like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); 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; ID (customer ID)&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;Store&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;Behaviour&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;€&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table key is ID+Store (meaning that a customer has only one possible behaviour in each store&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm trying to achieve is: "how many € are spent in Store "B" with a specific behaviour (destination) by the clients who have a specific behaviour in Store "A" (origin)?",&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;sum({&amp;lt;[ID]=p({&amp;lt;[Store]=AltStore::[Store]&amp;gt;*&amp;lt;[Behaviour]=AltBehaviour::[Behaviour]&amp;gt;} [ID])&amp;gt;} €) &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store and Behaviour are the dimensions of the table, and therefore represent the "destination"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To cycle between the possible "origins", I have 2 selection tools, one for AltStore and one for AltBehaviour (and a macro to cycle all the combinations and export to excel)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the expression works fine when I make a selection in AltStore only, with no selection for AltBehaviour&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;As I select AltBehaviour I have sometimes (not always) wrong results, with the &lt;/SPAN&gt;sum of € for all the possibile origin behaviours higher than the results without selections on AltBehaviour&lt;/P&gt;&lt;P&gt;Also the count(ID) doesn't work, with the same ratio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As it doesn't happen always, I don't have a clue on the problem, can someone please tell me what's wrong in the above expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks... Alessandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Aug 2016 15:28:41 GMT</pubDate>
    <dc:creator>alferrar</dc:creator>
    <dc:date>2016-08-09T15:28:41Z</dc:date>
    <item>
      <title>Problem with alt states in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-alt-states-in-set-analysis/m-p/1157983#M519775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I have a simple database (simple but with milions of rows) like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); 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; ID (customer ID)&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;Store&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;Behaviour&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;€&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the table key is ID+Store (meaning that a customer has only one possible behaviour in each store&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm trying to achieve is: "how many € are spent in Store "B" with a specific behaviour (destination) by the clients who have a specific behaviour in Store "A" (origin)?",&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table with this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;sum({&amp;lt;[ID]=p({&amp;lt;[Store]=AltStore::[Store]&amp;gt;*&amp;lt;[Behaviour]=AltBehaviour::[Behaviour]&amp;gt;} [ID])&amp;gt;} €) &lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store and Behaviour are the dimensions of the table, and therefore represent the "destination"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To cycle between the possible "origins", I have 2 selection tools, one for AltStore and one for AltBehaviour (and a macro to cycle all the combinations and export to excel)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the expression works fine when I make a selection in AltStore only, with no selection for AltBehaviour&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;As I select AltBehaviour I have sometimes (not always) wrong results, with the &lt;/SPAN&gt;sum of € for all the possibile origin behaviours higher than the results without selections on AltBehaviour&lt;/P&gt;&lt;P&gt;Also the count(ID) doesn't work, with the same ratio&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As it doesn't happen always, I don't have a clue on the problem, can someone please tell me what's wrong in the above expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks... Alessandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2016 15:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-alt-states-in-set-analysis/m-p/1157983#M519775</guid>
      <dc:creator>alferrar</dc:creator>
      <dc:date>2016-08-09T15:28:41Z</dc:date>
    </item>
  </channel>
</rss>

