<?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: Comparing two dimension to determine chart data in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500369#M552832</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;If you have access to the script on the backend, you can use a preceding load to create another field. It will contain GroupID itself but only for those records which do not have Year = max(Year) and Month = Renewal Month. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the code and the result below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RawData:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;//If year is max and month is same as renewal month, field will be null, else it will be GroupID&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ( left(AcctOrigEffDate,4)=Year(today()) and mid(AcctOrigEffDate,5,2)=RenewalMth,&lt;/P&gt;&lt;P&gt;&amp;nbsp; null(), GroupID) as RelevantGroupID&lt;/P&gt;&lt;P&gt;Inline [&lt;/P&gt;&lt;P&gt;GroupID, GroupName, AcctOrigEffDate, Members, RenewalMth, Premium1, Premium2, Premium3&lt;/P&gt;&lt;P&gt;AAA, AAA Name, 20130701, 7, 7, 3708, 3708, 0&lt;/P&gt;&lt;P&gt;BBB, BBB Name, 20130701, 2, 7, 520, 520, 0&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 2, 7, 1067, 1095, 28&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 2, 7, 1096, 1124, 29&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 3, 7, 1685, 1729, 44&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 4, 7, 2921, 2998, 77&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 2, 7, 452, 464, 0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/47105_Capture.PNG.png" style="width: 620px; height: 94px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Oct 2013 20:44:25 GMT</pubDate>
    <dc:creator>manas_bn</dc:creator>
    <dc:date>2013-10-01T20:44:25Z</dc:date>
    <item>
      <title>Comparing two dimension to determine chart data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500368#M552831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="250" style="width: 720px; height: 250px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="68"&gt;Group ID&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="69"&gt;Group Name&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="102"&gt;Acct Orig Eff Date&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="64"&gt;Members&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="78"&gt;Renewal Mth&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="64"&gt;Premium1&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="64"&gt;Premium2&lt;/TD&gt;&lt;TD class="xl66" style="border-left: none;" width="64"&gt;Premium3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;AAA&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;AAA Name&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;20130701&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;3,708&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;3,708&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;BBB&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;BBB Name&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;20130701&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;520&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;520&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;CCC&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;CCC Name&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;20120101&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;1,067&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;1,095&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;28&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;CCC&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;CCC Name&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;20120101&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;1,096&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;1,124&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;29&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;CCC&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;CCC Name&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;20120101&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;1,685&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;1,729&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;44&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;CCC&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;CCC Name&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;20120101&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;2,921&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;2,998&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;77&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: none;"&gt;CCC&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;CCC Name&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;"&gt;20120101&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl69" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;452&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;464&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to filter on groups where the month in the Acct Orig Eff Date field equals the renewal month AND the year is the max year. So in the case above group id AAA and BBB each have the month of "07" (7 in the case of renewal month) AND the the year is 2013&amp;nbsp; - the max of the years. So AAA and BBB would NOT be included in the chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the most efficient way to filter on the above?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 18:56:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500368#M552831</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2013-10-01T18:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two dimension to determine chart data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500369#M552832</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;If you have access to the script on the backend, you can use a preceding load to create another field. It will contain GroupID itself but only for those records which do not have Year = max(Year) and Month = Renewal Month. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the code and the result below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RawData:&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;//If year is max and month is same as renewal month, field will be null, else it will be GroupID&lt;/P&gt;&lt;P&gt;&amp;nbsp; if ( left(AcctOrigEffDate,4)=Year(today()) and mid(AcctOrigEffDate,5,2)=RenewalMth,&lt;/P&gt;&lt;P&gt;&amp;nbsp; null(), GroupID) as RelevantGroupID&lt;/P&gt;&lt;P&gt;Inline [&lt;/P&gt;&lt;P&gt;GroupID, GroupName, AcctOrigEffDate, Members, RenewalMth, Premium1, Premium2, Premium3&lt;/P&gt;&lt;P&gt;AAA, AAA Name, 20130701, 7, 7, 3708, 3708, 0&lt;/P&gt;&lt;P&gt;BBB, BBB Name, 20130701, 2, 7, 520, 520, 0&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 2, 7, 1067, 1095, 28&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 2, 7, 1096, 1124, 29&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 3, 7, 1685, 1729, 44&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 4, 7, 2921, 2998, 77&lt;/P&gt;&lt;P&gt;CCC, CCC Name, 20120101, 2, 7, 452, 464, 0&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/47105_Capture.PNG.png" style="width: 620px; height: 94px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 20:44:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500369#M552832</guid>
      <dc:creator>manas_bn</dc:creator>
      <dc:date>2013-10-01T20:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two dimension to determine chart data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500370#M552833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you intend to NOT make any changes to the script, you can use the below as a calculated dimension and suppress null values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(left(AcctOrigEffDate,4)=Year(today()) and mid(AcctOrigEffDate,5,2),null(),GroupID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In both the cases, I have used Year(today()) as MAX(YEAR). You can create a variable to get the max(Year)... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Oct 2013 20:49:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500370#M552833</guid>
      <dc:creator>manas_bn</dc:creator>
      <dc:date>2013-10-01T20:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing two dimension to determine chart data</title>
      <link>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500371#M552834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a bunch. This works great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 12:01:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Comparing-two-dimension-to-determine-chart-data/m-p/500371#M552834</guid>
      <dc:creator>zagzebski</dc:creator>
      <dc:date>2013-10-02T12:01:52Z</dc:date>
    </item>
  </channel>
</rss>

