<?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 Cross Tabulation of census style data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288855#M1200841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;I have done something that works, but is a bit odd, maybe it exploits a bug?&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/674/2313.Capture.PNG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/674/2313.Capture.PNG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note that in the straight chart and the pivot table, the Sum expression is invalid! I really have not got my head around the set notation at all. However, it does what I want!?!&lt;/P&gt;&lt;P&gt;Maybe you can explain, or refine it a bit?&lt;/P&gt;&lt;P&gt;Essentially I duplicated all input:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;questionx:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; questionx&lt;BR /&gt; male?&lt;BR /&gt; female?&lt;BR /&gt; &amp;lt;30?&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?&lt;BR /&gt; &amp;gt;50?&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;questiony:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; questiony&lt;BR /&gt; male?&lt;BR /&gt; female?&lt;BR /&gt; &amp;lt;30?&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?&lt;BR /&gt; &amp;gt;50?&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;answerx:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; questionx, respondent, answer&lt;BR /&gt; male? , r1, 1&lt;BR /&gt; female? , r1, 0&lt;BR /&gt; &amp;lt;30? , r1, 1&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r1, 0&lt;BR /&gt; &amp;gt;50? , r1, 0&lt;BR /&gt; male? , r2, 0&lt;BR /&gt; female? , r2, 1&lt;BR /&gt; &amp;lt;30? , r2, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r2, 1&lt;BR /&gt; &amp;gt;50? , r2, 0&lt;BR /&gt; male? , r3, 0&lt;BR /&gt; female? , r3, 1&lt;BR /&gt; &amp;lt;30? , r3, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r3, 0&lt;BR /&gt; &amp;gt;50? , r3, 1&lt;BR /&gt; male? , r4, 0&lt;BR /&gt; female? , r4, 1&lt;BR /&gt; &amp;lt;30? , r4, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r4, 0&lt;BR /&gt; &amp;gt;50? , r4, 1&lt;BR /&gt; male? , r5, 1&lt;BR /&gt; female? , r5, 0&lt;BR /&gt; &amp;lt;30? , r5, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r5, 0&lt;BR /&gt; &amp;gt;50? , r5, 1&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;answery:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; questiony, respondent, answer&lt;BR /&gt; male? , r1, 1&lt;BR /&gt; female? , r1, 0&lt;BR /&gt; &amp;lt;30? , r1, 1&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r1, 0&lt;BR /&gt; &amp;gt;50? , r1, 0&lt;BR /&gt; male? , r2, 0&lt;BR /&gt; female? , r2, 1&lt;BR /&gt; &amp;lt;30? , r2, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r2, 1&lt;BR /&gt; &amp;gt;50? , r2, 0&lt;BR /&gt; male? , r3, 0&lt;BR /&gt; female? , r3, 1&lt;BR /&gt; &amp;lt;30? , r3, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r3, 0&lt;BR /&gt; &amp;gt;50? , r3, 1&lt;BR /&gt; male? , r4, 0&lt;BR /&gt; female? , r4, 1&lt;BR /&gt; &amp;lt;30? , r4, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r4, 0&lt;BR /&gt; &amp;gt;50? , r4, 1&lt;BR /&gt; male? , r5, 1&lt;BR /&gt; female? , r5, 0&lt;BR /&gt; &amp;lt;30? , r5, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r5, 0&lt;BR /&gt; &amp;gt;50? , r5, 1&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Nov 2010 09:21:44 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-17T09:21:44Z</dc:date>
    <item>
      <title>Cross Tabulation of census style data</title>
      <link>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288850#M1200836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have "questions", "respondents" and "answers". Below is an example with 5 questions, two respondents and 8 sets of answers (yes = 1/no = 0). Is it feasible to try and get an output table that looks something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;female? | &amp;lt;30? | 1&lt;BR /&gt;female? | &amp;gt;=30&amp;amp;&amp;lt;=50? | 1&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;(ie the total of females by age groups)? Multiply questions and respondents by ~20 000, there might be things like (urban?/rural?, state, town etc).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;question:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; question no, question&lt;BR /&gt; q1, male?&lt;BR /&gt; q2, female?&lt;BR /&gt; q3, &amp;lt;30?&lt;BR /&gt; q4, &amp;gt;=30&amp;amp;&amp;lt;=50?&lt;BR /&gt; q5, &amp;gt;50?&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;answer:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; question no, respondent, answer&lt;BR /&gt; q1, r1, 0&lt;BR /&gt; q2, r1, 1&lt;BR /&gt; q3, r1, 1&lt;BR /&gt; q4, r1, 0&lt;BR /&gt; q5, r2, 0&lt;BR /&gt; q1, r2, 0&lt;BR /&gt; q2, r2, 1&lt;BR /&gt; q3, r2, 0&lt;BR /&gt; q4, r2, 1&lt;BR /&gt; q5, r2, 0&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks for any help, I am a noob so please forgive me if I am missing the completely obvious. I can structure the input in any way I like, so I could duplicate the question tables if that were to help with cross tables (for example).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 11:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288850#M1200836</guid>
      <dc:creator />
      <dc:date>2010-11-16T11:26:44Z</dc:date>
    </item>
    <item>
      <title>Cross Tabulation of census style data</title>
      <link>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288851#M1200837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alex,&lt;/P&gt;&lt;P&gt;Check &lt;A href="http://community.qlik.com/media/p/130199.aspx" title="Simple Crosstable Sample"&gt;this file&lt;/A&gt; with sample code about crosstables. IT may be helpful if your data format is similar to the inline tables I used in it. As far as I see it, any question should be a separate field with their correspondings 1 or 0, so you could accumulate them.&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;EDIT: You're likely to find more interesting the GENERIC load with the sample data you provided. There are some useful posts and blog entries about them in the forum as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 11:44:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288851#M1200837</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-16T11:44:36Z</dc:date>
    </item>
    <item>
      <title>Cross Tabulation of census style data</title>
      <link>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288852#M1200838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Miguel&lt;/P&gt;&lt;P&gt;I am exploring this problem using the personal edition which means I cannot look at your sample. However I suspect that from your response that I may not be able to manipulate the questions as I would like (you say "question should be a separate field").&lt;/P&gt;&lt;P&gt;I did experiment with loading the question table twice so that I can use "question x" as an x co-ordinate and "question y" as a y co-ordinate. This looked promising - and looked a bit like the table I posted, but I need to have some cross table query as an expression in col 3. To rephrase my question, is it possible to do a "join" operation on in-memory tables (like SQL)?:&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/674/5554.Capture.PNG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/674/5554.Capture.PNG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;so "Sum (answer)" would be replaced with a SQL like query of my own which can reference the values in column 1 and column 2. I have been reading the manual quite hard, but still can't see the wood for the trees.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 12:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288852#M1200838</guid>
      <dc:creator />
      <dc:date>2010-11-16T12:55:39Z</dc:date>
    </item>
    <item>
      <title>Cross Tabulation of census style data</title>
      <link>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288853#M1200839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alex,&lt;/P&gt;&lt;P&gt;Let's see if Jason can take a look at the files and make them available for personal edition.&lt;/P&gt;&lt;P&gt;Similar to how you join queries in SQL you can do with tables loaded in QlikView. According to your script above&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;question:LOAD * INLINE [ question no, question q1, male? q2, female? q3, &amp;lt;30? q4, &amp;gt;=30&amp;amp;&amp;lt;=50? q5, &amp;gt;50?]; answer:JOIN LOAD * INLINE [ question no, respondent, answer q1, r1, 0 q2, r1, 1 q3, r1, 1 q4, r1, 0 q5, r2, 0 q1, r2, 0 q2, r2, 1 q3, r2, 0 q4, r2, 1 q5, r2, 0]; T:GENERIC LOAD respondent, question, answerRESIDENT question;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Now create a new chart, pivot table, add "&amp;lt;30?" as dimension and&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;Sum({&amp;lt; question = {'female?'} &amp;gt;} answer)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;As expression.&lt;/P&gt;&lt;P&gt;Is this closer to what you are looking?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 13:32:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288853#M1200839</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2010-11-16T13:32:53Z</dc:date>
    </item>
    <item>
      <title>Cross Tabulation of census style data</title>
      <link>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288854#M1200840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you again for such a thorough attempt to help me, it works well for that smallish set of questions.&lt;/P&gt;&lt;P&gt;I think that I am going to hit a rock wall with the number of questions: I must cater for about 20,000.&lt;/P&gt;&lt;P&gt;So, unless I am missing something, the "programmability" of the solution is not there, as I don't think it is practical to do the join the way you have, and to have so many field names? The final user should have the ability to grab a bunch of questions from x, and a bunch from y and simply crosstab.&lt;/P&gt;&lt;P&gt;I made an assumption that QlikView would provide a query language for joining tables already in memory and it seems I am wrong. I wasn't sure even that would scale, but I was going to test that.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Nov 2010 16:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288854#M1200840</guid>
      <dc:creator />
      <dc:date>2010-11-16T16:49:26Z</dc:date>
    </item>
    <item>
      <title>Cross Tabulation of census style data</title>
      <link>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288855#M1200841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;I have done something that works, but is a bit odd, maybe it exploits a bug?&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/674/2313.Capture.PNG"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/674/2313.Capture.PNG" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Note that in the straight chart and the pivot table, the Sum expression is invalid! I really have not got my head around the set notation at all. However, it does what I want!?!&lt;/P&gt;&lt;P&gt;Maybe you can explain, or refine it a bit?&lt;/P&gt;&lt;P&gt;Essentially I duplicated all input:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;&lt;BR /&gt;questionx:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; questionx&lt;BR /&gt; male?&lt;BR /&gt; female?&lt;BR /&gt; &amp;lt;30?&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?&lt;BR /&gt; &amp;gt;50?&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;questiony:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; questiony&lt;BR /&gt; male?&lt;BR /&gt; female?&lt;BR /&gt; &amp;lt;30?&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?&lt;BR /&gt; &amp;gt;50?&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;answerx:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; questionx, respondent, answer&lt;BR /&gt; male? , r1, 1&lt;BR /&gt; female? , r1, 0&lt;BR /&gt; &amp;lt;30? , r1, 1&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r1, 0&lt;BR /&gt; &amp;gt;50? , r1, 0&lt;BR /&gt; male? , r2, 0&lt;BR /&gt; female? , r2, 1&lt;BR /&gt; &amp;lt;30? , r2, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r2, 1&lt;BR /&gt; &amp;gt;50? , r2, 0&lt;BR /&gt; male? , r3, 0&lt;BR /&gt; female? , r3, 1&lt;BR /&gt; &amp;lt;30? , r3, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r3, 0&lt;BR /&gt; &amp;gt;50? , r3, 1&lt;BR /&gt; male? , r4, 0&lt;BR /&gt; female? , r4, 1&lt;BR /&gt; &amp;lt;30? , r4, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r4, 0&lt;BR /&gt; &amp;gt;50? , r4, 1&lt;BR /&gt; male? , r5, 1&lt;BR /&gt; female? , r5, 0&lt;BR /&gt; &amp;lt;30? , r5, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r5, 0&lt;BR /&gt; &amp;gt;50? , r5, 1&lt;BR /&gt;];&lt;BR /&gt;&lt;BR /&gt;answery:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt; questiony, respondent, answer&lt;BR /&gt; male? , r1, 1&lt;BR /&gt; female? , r1, 0&lt;BR /&gt; &amp;lt;30? , r1, 1&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r1, 0&lt;BR /&gt; &amp;gt;50? , r1, 0&lt;BR /&gt; male? , r2, 0&lt;BR /&gt; female? , r2, 1&lt;BR /&gt; &amp;lt;30? , r2, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r2, 1&lt;BR /&gt; &amp;gt;50? , r2, 0&lt;BR /&gt; male? , r3, 0&lt;BR /&gt; female? , r3, 1&lt;BR /&gt; &amp;lt;30? , r3, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r3, 0&lt;BR /&gt; &amp;gt;50? , r3, 1&lt;BR /&gt; male? , r4, 0&lt;BR /&gt; female? , r4, 1&lt;BR /&gt; &amp;lt;30? , r4, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r4, 0&lt;BR /&gt; &amp;gt;50? , r4, 1&lt;BR /&gt; male? , r5, 1&lt;BR /&gt; female? , r5, 0&lt;BR /&gt; &amp;lt;30? , r5, 0&lt;BR /&gt; &amp;gt;=30&amp;amp;&amp;lt;=50?, r5, 0&lt;BR /&gt; &amp;gt;50? , r5, 1&lt;BR /&gt;];&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Thanks and regards&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 09:21:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cross-Tabulation-of-census-style-data/m-p/288855#M1200841</guid>
      <dc:creator />
      <dc:date>2010-11-17T09:21:44Z</dc:date>
    </item>
  </channel>
</rss>

