<?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 / aggr - Get value over 2 dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962710#M330269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you give this a shot may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue(DISTINCT {&amp;lt;DiagramPar = {'Hb'}&amp;gt;} DiagramValue, -DiagramDate)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Sep 2015 12:36:09 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-09-16T12:36:09Z</dc:date>
    <item>
      <title>Set analysis / aggr - Get value over 2 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962708#M330267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I need some help regarding the following problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a chart with the Dimension "PatientID" and I want to show as an expression for each Patient the oldest "Hb" value (marked values in the screenshot). As shown in the screenshot a patient can have different parameter values for a date. The relevant parameter (in this example "Hb") is stored in the variable "&lt;SPAN style="font-size: 13.3333px;"&gt;Para4PatOverview&lt;/SPAN&gt;".&lt;/P&gt;&lt;P&gt;&lt;IMG alt="exampleData.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/99122_exampleData.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to implement this requirement with aggr and set analysis but I can't solve completely the problem.&lt;/P&gt;&lt;P&gt;The following code works, but only when one entry for the oldest date for a patient is stored in the dataset (green marked example). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;=min(aggr(if(DiagramDate =&lt;/TD&gt;&lt;TD&gt;Min({&amp;lt;DiagramPar={$(Para4PatOverview)}&amp;gt;} DiagramDate), DiagramValue),DiagramDate))&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When more than one entry is available for the oldest date for the patient (red marked examples) the code returns nothing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am grateful for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962708#M330267</guid>
      <dc:creator>daniel1990xyz</dc:creator>
      <dc:date>2015-09-16T12:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis / aggr - Get value over 2 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962709#M330268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;may be try&lt;/P&gt;&lt;P&gt;=min(aggr(if(DiagramDate=Min({&amp;lt;DiagramPar={$(Para4PatOverview)}&amp;gt;} DiagramDate), DiagramValue),DiagramDate,PatientID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:32:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962709#M330268</guid>
      <dc:creator>sasiparupudi1</dc:creator>
      <dc:date>2015-09-16T12:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis / aggr - Get value over 2 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962710#M330269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you give this a shot may be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=FirstSortedValue(DISTINCT {&amp;lt;DiagramPar = {'Hb'}&amp;gt;} DiagramValue, -DiagramDate)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:36:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962710#M330269</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-09-16T12:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis / aggr - Get value over 2 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962711#M330270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi &lt;/P&gt;&lt;P&gt;you can use this expression&lt;/P&gt;&lt;P&gt;=if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DiagramDate &lt;/SPAN&gt;=min(total &amp;lt;PatientID&amp;gt; {&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DiagramPar&lt;/SPAN&gt;={hb}&amp;gt;}aggr(min({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DiagramPar&lt;/SPAN&gt;={hb}&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DiagramDate &lt;/SPAN&gt;),&lt;SPAN style="font-size: 13.3333px;"&gt;PatientID&lt;/SPAN&gt;)),red())&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 12:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962711#M330270</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2015-09-16T12:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis / aggr - Get value over 2 dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962712#M330271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, this solves my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Sep 2015 14:09:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-aggr-Get-value-over-2-dimension/m-p/962712#M330271</guid>
      <dc:creator>daniel1990xyz</dc:creator>
      <dc:date>2015-09-16T14:09:23Z</dc:date>
    </item>
  </channel>
</rss>

