<?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>Question Re: Min Value and Max Value from Same Dataset in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888746#M4463709</link>
    <description>&lt;P&gt;follow below steps.&lt;/P&gt;&lt;P&gt;Create variable &lt;STRONG&gt;Show/Hide&lt;/STRONG&gt;=If([Update Date])=Max([Update Date]) In ([ID]) Then "Show" Else "Hide"&lt;/P&gt;&lt;P&gt;Apply table level filter on Show/Hide where equal to "Show".After that you will get one row for each  ID.&lt;/P&gt;&lt;P&gt;Next step is use below formula in Create Date column to display min date.&lt;/P&gt;&lt;P&gt;=NoFilter(Min([Create Date]) In ([ID]))&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1667492-untitled.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Apr 2019 15:57:29 GMT</pubDate>
    <dc:creator>amitrathi239</dc:creator>
    <dc:date>2019-04-11T15:57:29Z</dc:date>
    <item>
      <title>Min Value and Max Value from Same Dataset</title>
      <link>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaq-p/11888744</link>
      <description>&lt;P&gt;I am attempting to extract data from a database that has an error in it. I can't resolve the error (it's a "design feature"), so i have to try to query around it. Here's how it is stored.&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;Record ID | Create Date | Update Date | Record Status
123       | 05/01/2018  | 05/01/2018  | Active
123       | 05/08/2018  | 05/08/2018  | Active
123       | 05/15/2018  | 05/15/2018  | Closed
123       | 05/22/2018  | 05/22/2018  | Closed
456       | 06/02/2018  | 06/02/2018  | Pending
456       | 06/09/2018  | 06/09/2018  | Active
456       | 06/16/2018  | 06/16/2018  | Active
456       | 06/23/2018  | 06/23/2018  | Suspended
&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;P&gt;And so on. As you can see, the Create Date and Update Date values match on each row. The Create Date value is supposed to be the date the Record ID was initially created, but it's actually being captured as the date the Record ID update was created.&lt;/P&gt;
  &lt;P&gt;What I need is a report that brings me a single row per Record ID that shows me the minimum Create Date and the maximum Update Date, so that the result looks something like this:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;Record ID | Create Date | Update Date | Record Status
123       | 05/01/2018  | 05/22/2018  | Closed
456       | 06/02/2018  | 06/23/2018  | Suspended
&lt;/CODE&gt;&lt;/PRE&gt; 
  &lt;P&gt;I've tried adding MIN and MAX variables, but that doesn't seem to have any effect on the data.&lt;CODE&gt;&lt;/CODE&gt;&lt;/P&gt;
  &lt;P&gt;I'm relatively new to Business Objects (WEBI), though I think I'm picking up its concepts quickly. What am I missing here?&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 18:45:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaq-p/11888744</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-04-10T18:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: Min Value and Max Value from Same Dataset</title>
      <link>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888745#M4463708</link>
      <description>&lt;P&gt;Store the MIN and MAX dates in two variables. Use them as a condition to pull the record in your query filters. Please see if this works.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2019 19:43:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888745#M4463708</guid>
      <dc:creator>developerone</dc:creator>
      <dc:date>2019-04-10T19:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Min Value and Max Value from Same Dataset</title>
      <link>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888746#M4463709</link>
      <description>&lt;P&gt;follow below steps.&lt;/P&gt;&lt;P&gt;Create variable &lt;STRONG&gt;Show/Hide&lt;/STRONG&gt;=If([Update Date])=Max([Update Date]) In ([ID]) Then "Show" Else "Hide"&lt;/P&gt;&lt;P&gt;Apply table level filter on Show/Hide where equal to "Show".After that you will get one row for each  ID.&lt;/P&gt;&lt;P&gt;Next step is use below formula in Create Date column to display min date.&lt;/P&gt;&lt;P&gt;=NoFilter(Min([Create Date]) In ([ID]))&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1667492-untitled.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 15:57:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888746#M4463709</guid>
      <dc:creator>amitrathi239</dc:creator>
      <dc:date>2019-04-11T15:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Min Value and Max Value from Same Dataset</title>
      <link>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888747#M4463710</link>
      <description>&lt;P&gt;Tried it. No luck. The Create Date and the Update Date--including the columns with the MIN and MAX variables--still match on all rows.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 17:16:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888747#M4463710</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-04-11T17:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Min Value and Max Value from Same Dataset</title>
      <link>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888748#M4463711</link>
      <description>&lt;P&gt;That seems to be working. I'm still getting some duplicate lines, but I think I know what's causing those. I think I'll work your solution into a more complex query to see if it works in a broader application.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2019 17:35:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/min-value-and-max-value-from-same-dataset/qaa-p/11888748#M4463711</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-04-11T17:35:41Z</dc:date>
    </item>
  </channel>
</rss>

