<?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 Expression data does not correspond to Dimension value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889482#M309926</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'm trying to create a table that shows top 2 applicant countries but I'm having trouble determining why the pivot table data created as Expression does not display the correct values.&amp;nbsp; The table shows following data&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;Term&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Total Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;International&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014 Summer&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1664&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;89 China, 17 South Korea&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014 Fall&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1484&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;45 China, 5 South Korea&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2015 Spring&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;423&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2 China, 0 South Korea&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the correct values are only displayed when I select a particular term.&amp;nbsp; So if I select "2014 Fall," then the correct values for International is displayed&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;Term&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Total Count&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;International&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014 Fall&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1484&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;45 China, 10 Brazil&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently the Term comes from a key INLINE LOAD fact table of the terms shown in the 1st table, then I have a load table with applicants' ID and Country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the following variables to determine most frequent Country string and the second most frequent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(DEMO_PS_APP_CITIZ_CNTRY,-(aggr(count({$&amp;lt;DEMO_PS_APP_CITIZ_CNTRY-={"UNITED STATES"}&amp;gt;}DEMO_PS_APP_ID), DEMO_PS_APP_CITIZ_CNTRY)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(DEMO_PS_APP_CITIZ_CNTRY,-(aggr(count({$&amp;lt;DEMO_PS_APP_CITIZ_CNTRY-={"UNITED STATES"}&amp;gt;}DEMO_PS_APP_ID), DEMO_PS_APP_CITIZ_CNTRY)),2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the International column data is filled using the following Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;DEMO_PS_APP_CITIZ_CNTRY={"$(vInternationalMax_AP)"}&amp;gt;}DEMO_PS_APP_ID)&amp;amp; ' ' &amp;amp; vInternationalMax_AP &amp;amp; ', ' &amp;amp; &lt;/P&gt;&lt;P&gt;count({&amp;lt;DEMO_PS_APP_CITIZ_CNTRY={"$(vInternationalMax2_AP)"}&amp;gt;}DEMO_PS_APP_ID)&amp;amp; ' ' &amp;amp; vInternationalMax2_AP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that somewhere in the Variables or Expressions I need to tie the Term dimension but just have not been successful.&amp;nbsp; Any help will be much appreciated!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, in the load process, the Applicants table field of Term is mapped to key Term table as 'App_Term' AS 'keyTerm'.&amp;nbsp; This was done because there are other tables (admits, matrics, etc.) that need to use the same key Term fact table. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2015 15:09:54 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-19T15:09:54Z</dc:date>
    <item>
      <title>Expression data does not correspond to Dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889482#M309926</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'm trying to create a table that shows top 2 applicant countries but I'm having trouble determining why the pivot table data created as Expression does not display the correct values.&amp;nbsp; The table shows following data&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;Term&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Total Count&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;International&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014 Summer&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1664&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;89 China, 17 South Korea&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014 Fall&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1484&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;45 China, 5 South Korea&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2015 Spring&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;423&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2 China, 0 South Korea&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the correct values are only displayed when I select a particular term.&amp;nbsp; So if I select "2014 Fall," then the correct values for International is displayed&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;Term&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Total Count&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;International&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2014 Fall&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1484&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;45 China, 10 Brazil&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently the Term comes from a key INLINE LOAD fact table of the terms shown in the 1st table, then I have a load table with applicants' ID and Country.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created the following variables to determine most frequent Country string and the second most frequent:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(DEMO_PS_APP_CITIZ_CNTRY,-(aggr(count({$&amp;lt;DEMO_PS_APP_CITIZ_CNTRY-={"UNITED STATES"}&amp;gt;}DEMO_PS_APP_ID), DEMO_PS_APP_CITIZ_CNTRY)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=FirstSortedValue(DEMO_PS_APP_CITIZ_CNTRY,-(aggr(count({$&amp;lt;DEMO_PS_APP_CITIZ_CNTRY-={"UNITED STATES"}&amp;gt;}DEMO_PS_APP_ID), DEMO_PS_APP_CITIZ_CNTRY)),2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the International column data is filled using the following Expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;DEMO_PS_APP_CITIZ_CNTRY={"$(vInternationalMax_AP)"}&amp;gt;}DEMO_PS_APP_ID)&amp;amp; ' ' &amp;amp; vInternationalMax_AP &amp;amp; ', ' &amp;amp; &lt;/P&gt;&lt;P&gt;count({&amp;lt;DEMO_PS_APP_CITIZ_CNTRY={"$(vInternationalMax2_AP)"}&amp;gt;}DEMO_PS_APP_ID)&amp;amp; ' ' &amp;amp; vInternationalMax2_AP&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that somewhere in the Variables or Expressions I need to tie the Term dimension but just have not been successful.&amp;nbsp; Any help will be much appreciated!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, in the load process, the Applicants table field of Term is mapped to key Term table as 'App_Term' AS 'keyTerm'.&amp;nbsp; This was done because there are other tables (admits, matrics, etc.) that need to use the same key Term fact table. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 15:09:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889482#M309926</guid>
      <dc:creator />
      <dc:date>2015-05-19T15:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Expression data does not correspond to Dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889483#M309927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a qlikview document that demonstrates the problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 13:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889483#M309927</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-20T13:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: Expression data does not correspond to Dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889484#M309928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the offer to take a look at the problem.&amp;nbsp; I was able to create a qvw file that mimics the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aricin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 20:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889484#M309928</guid>
      <dc:creator />
      <dc:date>2015-05-20T20:14:54Z</dc:date>
    </item>
    <item>
      <title>Re: Expression data does not correspond to Dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889485#M309929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, the expressions in the variables start with a = character. That means they're calculated outside the context of the chart. They'll have the same value wherever they are used in the document. When you select a Term, then the variable is recalculated and will consider only the Term you selected. So the values of the variables will change like you noticed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 05:27:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889485#M309929</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-05-21T05:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Expression data does not correspond to Dimension value</title>
      <link>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889486#M309930</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the comment, Gysbert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I removed the leading "=" from the variables, now the Expressions return no values by default or when I select a term.&amp;nbsp;&amp;nbsp; Any other suggestion on how to go about fixing my problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aricin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 14:17:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Expression-data-does-not-correspond-to-Dimension-value/m-p/889486#M309930</guid>
      <dc:creator />
      <dc:date>2015-05-21T14:17:11Z</dc:date>
    </item>
  </channel>
</rss>

