<?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: PivotTable issue with expression column in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621998#M1108716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my data model displayed in QlikView:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="data_Model.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55883_data_Model.PNG.png" style="width: 620px; height: 399px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems there is no relation between the tables. Is there a way to make the relations in this window ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Mar 2014 08:14:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-03-26T08:14:58Z</dc:date>
    <item>
      <title>PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621988#M1108703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm testing QlikView Personal Edition and I'm encountering an issue when I create a pivot table with an expression that does not take into account the dimensions of the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 3 tables (users, activities and countries) with these relations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A user has [one] activity / An activity can have [zero to many] users&lt;/LI&gt;&lt;LI&gt;A user has [one] country / A country can have [zero to many] users&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally, I wish to have a table that shows the number of user by countries/activities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm able to create a pivot table with 2 dimensions (activities, countries) and I use &lt;EM&gt;COUNT(IDPERSON)&lt;/EM&gt; as expression, where &lt;EM&gt;IDPERSON&lt;/EM&gt; is the primary key of the table users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 2 dimensions work fine, countries correctly contain their activities but the column with the expression always displays the number of rows contained by my table users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did someone already encounter this issue ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 22:31:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621988#M1108703</guid>
      <dc:creator />
      <dc:date>2014-03-25T22:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621989#M1108704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you post some sample data and the screen shot of your pivot table please.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 22:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621989#M1108704</guid>
      <dc:creator />
      <dc:date>2014-03-25T22:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621990#M1108705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems that the pivot table is displaying correctly to me-the count(personID) should return the number of rows in the person table.What is wrong with the result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 23:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621990#M1108705</guid>
      <dc:creator />
      <dc:date>2014-03-25T23:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621991#M1108707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Using Count(personID) will return the number of times that a PersonID appears in rows of your original datasource. Maybe, what you want is to count the unique ocurrences of every PersonID per country and per activity. In that case, you'll need to use &lt;STRONG&gt;Count(DISTINCT IDPERSON)&lt;/STRONG&gt; as your expression,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Mar 2014 23:34:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621991#M1108707</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-03-25T23:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621992#M1108709</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;Thanks for your fast answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@&lt;SPAN class="j-post-author"&gt;&lt;STRONG&gt;&lt;A href="https://community.qlik.com/people/jaimeaguilar"&gt;jaimeaguilar&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;: I just tried adding the keyword DISTINCT but unfortunately, the number still shows the total of rows in my table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This screenshot illustrates my issue:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="pivot_table.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55877_pivot_table.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The column &lt;EM&gt;Nb personne&lt;/EM&gt; is not "filtered" by the dimensions in the two left columns. Maybe the function &lt;EM&gt;COUNT(...)&lt;/EM&gt; is not what I should use for that purpose. In my case, the numbers for Liechtenstein should be lower than 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are my settings for this pivot table.&lt;/P&gt;&lt;P&gt;My dimensions tab:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="dimension.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55878_dimension.PNG.png" style="width: 620px; height: 443px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression tab:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="expression.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55879_expression.PNG.png" style="width: 620px; height: 266px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if the issue is related to how I imported the data in QlikView. For that, I used the dialog "File &amp;gt; Edit the script" and I selected an external datasource, as follows:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="db_connection.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55880_db_connection.PNG.png" style="width: 620px; height: 566px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use QlikView 11.20.12235.0 SR5 (64-bit).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 07:35:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621992#M1108709</guid>
      <dc:creator />
      <dc:date>2014-03-26T07:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621993#M1108711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure but this result you got because of wrong data modeling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just check your data model is correct or not??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 07:41:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621993#M1108711</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-26T07:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621994#M1108712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my data model from my MSSQL database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="model.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55881_model.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The relations are correctly made, I can query the data from a view in the database:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="view.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55882_view.png" style="width: 620px; height: 535px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The grid shows the number of people by activity in Liechtenstein. That would be great to have a similar result in QlikView.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 08:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621994#M1108712</guid>
      <dc:creator />
      <dc:date>2014-03-26T08:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621995#M1108713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I means check your data model in qlikview.&lt;/P&gt;&lt;P&gt;Is it similar to your above data Model??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 08:05:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621995#M1108713</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-26T08:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621996#M1108714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;Where can I find the data model in qlikview ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 08:08:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621996#M1108714</guid>
      <dc:creator />
      <dc:date>2014-03-26T08:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621997#M1108715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just press ctrl+T&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 08:10:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621997#M1108715</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-26T08:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621998#M1108716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is my data model displayed in QlikView:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="data_Model.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55883_data_Model.PNG.png" style="width: 620px; height: 399px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems there is no relation between the tables. Is there a way to make the relations in this window ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 08:14:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621998#M1108716</guid>
      <dc:creator />
      <dc:date>2014-03-26T08:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621999#M1108717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes and that is the issue and because of that you are getting wrong output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try to create relation between them,&lt;/P&gt;&lt;P&gt;Refer&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; your data model from MSSQL and try to create similar data model in Qlikview.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 08:19:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/621999#M1108717</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-26T08:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/622000#M1108718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlikview links tables where one or more fields have the same name in the table. Ideally there should be only one such key field. Like this - replace your PAC_PERSON load with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PER_COUNTRY As ID_Country,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PER_ACTIVITY As ACTIVITY_ID;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQL SELECT * FROM PAC_PERSON;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you will see that the three tables are associated. That should also fix your count problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 08:24:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/622000#M1108718</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-03-26T08:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/622001#M1108720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great ! It works fine now. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The solution was to make two alias for the foreign keys as suggested by Jonathan Dienst. Apparently, QlikView makes the relations between the fields with the same names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my full import script:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="issue.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/55888_issue.png" style="width: 620px; height: 563px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your great and fast support.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 09:40:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/622001#M1108720</guid>
      <dc:creator />
      <dc:date>2014-03-26T09:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: PivotTable issue with expression column</title>
      <link>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/622002#M1108722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope because of this your original issue also solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Mar 2014 09:45:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/PivotTable-issue-with-expression-column/m-p/622002#M1108722</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-03-26T09:45:05Z</dc:date>
    </item>
  </channel>
</rss>

