<?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 Where exists (...) in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-exists-in-load-script/m-p/1684491#M455805</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I hope someone can help me on this one. Thank you in advance.&lt;/P&gt;&lt;P&gt;I have one table with information about previous students. This is table "Course_Participated", and it contains information about the student id number (Part_id), year of study (Yr), Course id (Course_id) and the exam result on the course (Mark).&lt;/P&gt;&lt;P&gt;Then I have a second table with information about those who applies for different courses this year. This is table "Course_applied", and it contains information about the student id number (App_id), which course she applies (App_course_id) and, as each person can apply for more than one course, the variable App_nr is an indicator for number of application per person.&lt;/P&gt;&lt;P&gt;App_course_id and&amp;nbsp;Part_id is unique for each person. This means that if&amp;nbsp;App_course_id equals Part_id then it is the same person.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question: I want to create a new table similar to the table Output below.&amp;nbsp; This table should only include the id number of the applicantans which has participated in a course before, and it should include the year the person participated and the mark.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward to replies from the community!&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Torbjørn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Course_Participated:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Part_id, Yr, Course_id, Mark&lt;BR /&gt;1, 2015, dk, P&lt;BR /&gt;2, 2016, ls, F&lt;BR /&gt;2, 2017, dk, Q&lt;BR /&gt;2, 2018, as, F&lt;BR /&gt;2, 2019, dk, P&lt;BR /&gt;3, 2019, dk, F&lt;BR /&gt;4, 2019, ss, P&lt;BR /&gt;5, 2018, ss, P&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Course_applied:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;App_id, App_nr, App_course_id&lt;BR /&gt;2, 1, ss&lt;BR /&gt;2, 2, dk&lt;BR /&gt;2, 3, ma&lt;BR /&gt;3, 1, dk&lt;BR /&gt;3, 2, ss&lt;BR /&gt;7, 1, ss&lt;BR /&gt;7, 2, na&lt;BR /&gt;7, 3, ma&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Output:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ref_id_OUTPUT, App_nr_OUTPUT, App_course_id_OUTPUT, Participated_Before_OUTPUT, Mark_Before_OUTPUT&lt;BR /&gt;2, 2, dk, '(2017, 2019)', '(Q,P)'&lt;BR /&gt;3, 1, dk, '(2019)', '(P)'&lt;BR /&gt;];&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 01:03:41 GMT</pubDate>
    <dc:creator>Mr_small_t</dc:creator>
    <dc:date>2024-11-16T01:03:41Z</dc:date>
    <item>
      <title>Where exists (...) in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Where-exists-in-load-script/m-p/1684491#M455805</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I hope someone can help me on this one. Thank you in advance.&lt;/P&gt;&lt;P&gt;I have one table with information about previous students. This is table "Course_Participated", and it contains information about the student id number (Part_id), year of study (Yr), Course id (Course_id) and the exam result on the course (Mark).&lt;/P&gt;&lt;P&gt;Then I have a second table with information about those who applies for different courses this year. This is table "Course_applied", and it contains information about the student id number (App_id), which course she applies (App_course_id) and, as each person can apply for more than one course, the variable App_nr is an indicator for number of application per person.&lt;/P&gt;&lt;P&gt;App_course_id and&amp;nbsp;Part_id is unique for each person. This means that if&amp;nbsp;App_course_id equals Part_id then it is the same person.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question: I want to create a new table similar to the table Output below.&amp;nbsp; This table should only include the id number of the applicantans which has participated in a course before, and it should include the year the person participated and the mark.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking forward to replies from the community!&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Torbjørn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Course_Participated:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;Part_id, Yr, Course_id, Mark&lt;BR /&gt;1, 2015, dk, P&lt;BR /&gt;2, 2016, ls, F&lt;BR /&gt;2, 2017, dk, Q&lt;BR /&gt;2, 2018, as, F&lt;BR /&gt;2, 2019, dk, P&lt;BR /&gt;3, 2019, dk, F&lt;BR /&gt;4, 2019, ss, P&lt;BR /&gt;5, 2018, ss, P&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Course_applied:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;App_id, App_nr, App_course_id&lt;BR /&gt;2, 1, ss&lt;BR /&gt;2, 2, dk&lt;BR /&gt;2, 3, ma&lt;BR /&gt;3, 1, dk&lt;BR /&gt;3, 2, ss&lt;BR /&gt;7, 1, ss&lt;BR /&gt;7, 2, na&lt;BR /&gt;7, 3, ma&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;Output:&lt;BR /&gt;LOAD * INLINE [&lt;BR /&gt;ref_id_OUTPUT, App_nr_OUTPUT, App_course_id_OUTPUT, Participated_Before_OUTPUT, Mark_Before_OUTPUT&lt;BR /&gt;2, 2, dk, '(2017, 2019)', '(Q,P)'&lt;BR /&gt;3, 1, dk, '(2019)', '(P)'&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:03:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-exists-in-load-script/m-p/1684491#M455805</guid>
      <dc:creator>Mr_small_t</dc:creator>
      <dc:date>2024-11-16T01:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Where exists (...) in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Where-exists-in-load-script/m-p/1684507#M455806</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe something like this (see attached)?&lt;/P&gt;&lt;P&gt;I assumed that by this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;App_course_id and&amp;nbsp;Part_id is unique for each person. This means that if&amp;nbsp;App_course_id equals Part_id then it is the same person.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You meant that App_id is unique for each person, not App_course_id, as this does not give me the results in your output table. Also, your result for App_id/App_nr 3/1 I think might be wrong, as I get a mark of F not P, which I believe is correct as person 3 never got a 'P' mark according to your first table.&lt;/P&gt;&lt;P&gt;As for the script, I inner joined the 2 tables together to only leave Ref_id's that appear in both Participated/Applied. Then I used the concat() function to combine Yr/Mark into one field, and grouping by Ref_id/App_nr/Course_id to only have 1 line per combination.&lt;/P&gt;&lt;P&gt;Hope this is what you were looking for!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 14:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-exists-in-load-script/m-p/1684507#M455806</guid>
      <dc:creator>jensmunnichs</dc:creator>
      <dc:date>2020-03-13T14:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Where exists (...) in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Where-exists-in-load-script/m-p/1684515#M455807</link>
      <description>&lt;P&gt;That is brilliant!&lt;/P&gt;&lt;P&gt;Thank you for the swift reply!&lt;BR /&gt;&lt;BR /&gt;Regrads,&lt;BR /&gt;Torbjørn&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 14:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-exists-in-load-script/m-p/1684515#M455807</guid>
      <dc:creator>Mr_small_t</dc:creator>
      <dc:date>2020-03-13T14:28:45Z</dc:date>
    </item>
  </channel>
</rss>

