<?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: Need a set analysis expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634672#M733821</link>
    <description>&lt;P&gt;Try joining these 2 tables together:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21369i6A174E98ED21FD12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Remove the set analysis at the second expression.&lt;/P&gt;&lt;P&gt;Refer script as below:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;BR /&gt;Model,ReportMonth,VIN1&lt;BR /&gt;A,201901,V1&lt;BR /&gt;B,201901,V2&lt;BR /&gt;B,201902,V3&lt;BR /&gt;];&lt;BR /&gt;JOIN&lt;BR /&gt;LOAD Model,WSMonth AS ReportMonth,VIN2 Inline [&lt;BR /&gt;Model,WSMonth,VIN2&lt;BR /&gt;B,201901,V4&lt;BR /&gt;B,201902,V5&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Arthur Fong&lt;/P&gt;</description>
    <pubDate>Mon, 14 Oct 2019 06:35:52 GMT</pubDate>
    <dc:creator>Arthur_Fong</dc:creator>
    <dc:date>2019-10-14T06:35:52Z</dc:date>
    <item>
      <title>Need a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634633#M733820</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I have 2 tables like this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table1" style="width: 257px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21363iE348AFBEBEED4B27/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG" alt="Table1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Table1&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.PNG" style="width: 259px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21364iD94D3AAED1962377/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.PNG" alt="2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Relationship" style="width: 423px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21365i6CA3873315DE4E47/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.PNG" alt="Relationship" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Relationship&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All I want to do is to create a straight table with Model and ReportMonth dimension, and count the number of VIN1/VIN2 for each Model when WSMonth = ReportMonth&lt;/P&gt;&lt;P&gt;expect result :&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;ReportMonth&lt;/TD&gt;&lt;TD&gt;Count VIN1&lt;/TD&gt;&lt;TD&gt;Count VIN2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;201901&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;201901&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;201902&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what should my expression looks like ?&lt;/P&gt;&lt;P&gt;Thanks !&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:14:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634633#M733820</guid>
      <dc:creator>woshua5550</dc:creator>
      <dc:date>2024-11-16T02:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634672#M733821</link>
      <description>&lt;P&gt;Try joining these 2 tables together:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21369i6A174E98ED21FD12/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Remove the set analysis at the second expression.&lt;/P&gt;&lt;P&gt;Refer script as below:&lt;/P&gt;&lt;P&gt;LOAD * Inline [&lt;BR /&gt;Model,ReportMonth,VIN1&lt;BR /&gt;A,201901,V1&lt;BR /&gt;B,201901,V2&lt;BR /&gt;B,201902,V3&lt;BR /&gt;];&lt;BR /&gt;JOIN&lt;BR /&gt;LOAD Model,WSMonth AS ReportMonth,VIN2 Inline [&lt;BR /&gt;Model,WSMonth,VIN2&lt;BR /&gt;B,201901,V4&lt;BR /&gt;B,201902,V5&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Arthur Fong&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 06:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634672#M733821</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2019-10-14T06:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634747#M733822</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Arthur&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks, but I'm afraid we can't do the join because the 2 tables stands for different business meanings, you can consider that table1 is stock information and table2 is sales information&lt;/P&gt;&lt;P&gt;calculation goes wrong&amp;nbsp; when table2 becomes like this :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 259px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21374i07F27F4143DA3D74/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;expected result :&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Model&lt;/TD&gt;&lt;TD&gt;ReportMonth&lt;/TD&gt;&lt;TD&gt;Count VIN1&lt;/TD&gt;&lt;TD&gt;Count VIN2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;201901&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;201901&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;201902&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BRs&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 09:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634747#M733822</guid>
      <dc:creator>woshua5550</dc:creator>
      <dc:date>2019-10-14T09:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634775#M733823</link>
      <description>&lt;P&gt;If join is not a good option, perhaps concatenating both tables will solve the problem:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="clipboard_image_0.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21381i3893457741E8739E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="clipboard_image_0.png" alt="clipboard_image_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Refer qvw attached below as reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Arthur Fong&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 10:42:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634775#M733823</guid>
      <dc:creator>Arthur_Fong</dc:creator>
      <dc:date>2019-10-14T10:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need a set analysis expression</title>
      <link>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634825#M733824</link>
      <description>&lt;P&gt;Hi! Set analysis is evaluated once per chart. This means that you can't build a "row-wise set analysis" expression but it is what you need: for each value of the dimension "ReportMonth" you need to count VIN2 where WSMonth equals the respective value of ReportMonth. Said so and given that you can not modify the script (by the way, are you sure you cant? You dont neet to join nor concatenate both tables, you maybe can create an auxiliar field that helps you solve your problem) I suggest you to use an "if" expression:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Count(if(WSMonth = ReportMonth, VIN2))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;since it is row wise (but it is less efficient than set analysis so be careful).&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2019 12:13:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-a-set-analysis-expression/m-p/1634825#M733824</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-10-14T12:13:31Z</dc:date>
    </item>
  </channel>
</rss>

