<?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: Firstsortedvalue combine with formula that has min/max date variables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Firstsortedvalue-combine-with-formula-that-has-min-max-date/m-p/509942#M482945</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot to mention, my firstsortedvalue formula is being used on a different pivot table that has the same dimensions: ClientAccountName, UserId, and TestDate.&amp;nbsp; It works fine there and should work the same over on a straight table, though I can flip the straight table to a pivot table if needbe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jul 2013 17:59:49 GMT</pubDate>
    <dc:creator>stevelord</dc:creator>
    <dc:date>2013-07-22T17:59:49Z</dc:date>
    <item>
      <title>Firstsortedvalue combine with formula that has min/max date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsortedvalue-combine-with-formula-that-has-min-max-date/m-p/509941#M482944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have this formula on a straight table that works nicely with a couple of input boxes for mindate and maxdate.&amp;nbsp; And now I'd like to add a function to pick only the most current value for a given user within that date range.&amp;nbsp; I have a formula for that too and am trying to combine them basically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The straight chart has dimensions: ClientAccountName, UserId, and TestDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The chart's formula that works with my mindate maxdate input boxes is: &lt;/P&gt;&lt;P&gt;only(if(TestDate&amp;gt;=MinDate and TestDate&amp;lt;=MaxDate, rbBMI))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(rbBMI is a field I created in script that basically gives a low, normal, and high message depending on the person's BMI field value.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this formula to select most current record for a user within the year that is selected on a listbox, and I want it to work within the formula to pick the most current record for a user within the date range selected on the input boxes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;firstsortedvalue(rbBMI,-(TestDate*100000+BMI))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I gave the testdate a 100,000 weight so as to keep a testvalue from overriding the date value, and I put a testvalue in there to help it go after the non-zero test if there happens to be an empty value for the test on the same date.&amp;nbsp; (Someone may have refreshed all fields when adding a value to only one field and caused 0 values to be uploaded for the other fields... or something.&amp;nbsp; It's pretty odd, but somewhere out beyond my control.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I tried nesting one equation in the other and visa versa, but it's not working.&amp;nbsp; If anyone can get me something to pick &lt;SPAN style="text-decoration: underline;"&gt;the most current testvalue &lt;/SPAN&gt;within a mindate/maxdate variable range specified by input boxes, without hardcoding date ranges into script, I'd be grateful.&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 17:51:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsortedvalue-combine-with-formula-that-has-min-max-date/m-p/509941#M482944</guid>
      <dc:creator>stevelord</dc:creator>
      <dc:date>2013-07-22T17:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Firstsortedvalue combine with formula that has min/max date variables</title>
      <link>https://community.qlik.com/t5/QlikView/Firstsortedvalue-combine-with-formula-that-has-min-max-date/m-p/509942#M482945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot to mention, my firstsortedvalue formula is being used on a different pivot table that has the same dimensions: ClientAccountName, UserId, and TestDate.&amp;nbsp; It works fine there and should work the same over on a straight table, though I can flip the straight table to a pivot table if needbe.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 17:59:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Firstsortedvalue-combine-with-formula-that-has-min-max-date/m-p/509942#M482945</guid>
      <dc:creator>stevelord</dc:creator>
      <dc:date>2013-07-22T17:59:49Z</dc:date>
    </item>
  </channel>
</rss>

