<?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: Set Analysis when using Link Table to harmonize Date fields in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-when-using-Link-Table-to-harmonize-Date-fields/m-p/1634079#M47228</link>
    <description>&lt;P&gt;Thank you very much, that sorted out my issue!&lt;/P&gt;</description>
    <pubDate>Fri, 11 Oct 2019 07:42:02 GMT</pubDate>
    <dc:creator>Eddy</dc:creator>
    <dc:date>2019-10-11T07:42:02Z</dc:date>
    <item>
      <title>Set Analysis when using Link Table to harmonize Date fields</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-when-using-Link-Table-to-harmonize-Date-fields/m-p/1633829#M47206</link>
      <description>&lt;P&gt;Hello dear experts,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Fact Table with several different Date fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to use a Link table to be able to use only one date field "DATE" in the data model with "DateTyp" to refer to the correct date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Problem: How to adjust the set analysis to have the same results in the KPI boxes -&amp;gt; Max(DATE) now returns the global maximum over the whole set of values in the DATE field.&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;!Simple Example QVD attached!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Script:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Facts:&lt;BR /&gt;Load * Inline [&lt;BR /&gt;ID, Status, Num, DateA, DateB, DateC&lt;BR /&gt;1, A, 10, 43748, ,&lt;BR /&gt;2, A, 20, 43749, ,&lt;BR /&gt;3, A, 30, 43750, ,&lt;BR /&gt;4, B, 20, , 43748,&lt;BR /&gt;5, B, 20, , 43749,&lt;BR /&gt;6, B, 30, , 43750,&lt;BR /&gt;7, B, 40, , 43751,&lt;BR /&gt;8, B, 50, , 43752, 43800&lt;BR /&gt;9, C, 30, , , 43801&lt;BR /&gt;10, C, 40, , , 43802&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;LinkTable:&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;DateA as DATE,&lt;BR /&gt;'DateA' AS DateTyp&lt;BR /&gt;Resident Facts&lt;BR /&gt;Where Len(trim(DateA)) &amp;gt; 0 ;&lt;/P&gt;&lt;P&gt;For Each a in 'DateB', 'DateC'&lt;BR /&gt;Concatenate(LinkTable)&lt;BR /&gt;Load&lt;BR /&gt;ID,&lt;BR /&gt;$(a) as DATE,&lt;BR /&gt;'$(a)' as DateTyp&lt;BR /&gt;Resident Facts&lt;BR /&gt;Where Len(trim($(a))) &amp;gt; 0;&lt;BR /&gt;Next a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BEFORE:&lt;/P&gt;&lt;P&gt;KPI Objects like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;sum(&lt;BR /&gt;{&amp;lt;&lt;BR /&gt;Status = {'A'}&lt;BR /&gt;,DateA = {"$(=max(DateA))"}&lt;BR /&gt;&amp;gt;}&lt;BR /&gt;Num&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;NEW:&lt;/P&gt;&lt;P&gt;sum(&lt;BR /&gt;{&amp;lt;&lt;BR /&gt;Status = {'C'}&lt;BR /&gt;,DateTyp = {'DateC'}&lt;BR /&gt;,DATE = {"$(=max(DATE))"}&lt;BR /&gt;&amp;gt;}&lt;BR /&gt;Num&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt; I want DATE = {"$(=max(DATE))"} only for the date set where&amp;nbsp;Status = {'C'} AND&amp;nbsp;DateTyp = {'DateC'},&lt;/P&gt;&lt;P&gt;what could be the possible solution?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards&lt;/P&gt;&lt;P&gt;Eddy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 17:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-when-using-Link-Table-to-harmonize-Date-fields/m-p/1633829#M47206</guid>
      <dc:creator>Eddy</dc:creator>
      <dc:date>2019-10-10T17:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis when using Link Table to harmonize Date fields</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-when-using-Link-Table-to-harmonize-Date-fields/m-p/1633831#M47207</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sum(
	{&amp;lt;
    Status = {'A'}
    ,DateTyp = {'DateA'}
    ,DATE = {"$(=max({&amp;lt;DateTyp = {'DateA'}&amp;gt;}DATE))"}
    &amp;gt;}
    Num
    )
    &lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 942px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/21163i3B5B28A465E0E14C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2019 17:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-when-using-Link-Table-to-harmonize-Date-fields/m-p/1633831#M47207</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-10-10T17:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis when using Link Table to harmonize Date fields</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-when-using-Link-Table-to-harmonize-Date-fields/m-p/1634079#M47228</link>
      <description>&lt;P&gt;Thank you very much, that sorted out my issue!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Oct 2019 07:42:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-when-using-Link-Table-to-harmonize-Date-fields/m-p/1634079#M47228</guid>
      <dc:creator>Eddy</dc:creator>
      <dc:date>2019-10-11T07:42:02Z</dc:date>
    </item>
  </channel>
</rss>

