<?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: Finding the maximum value based on a customer ID in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89178#M8364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all. I was able to make it work based on your advice. One of the issues that I was having was Grouping in the wrong query. Once I figured that out, it works as advertised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Mar 2013 20:58:58 GMT</pubDate>
    <dc:creator>saltmarsh</dc:creator>
    <dc:date>2013-03-26T20:58:58Z</dc:date>
    <item>
      <title>Finding the maximum value based on a customer ID</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89172#M8358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using Enterprise Guide 4.2, I am trying to group data under one value where a customer will have one Customer ID but two locations. I'd like to be able to use the account with the largest balance within a customer id to determine which location to use for all accounts. For example, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cust ID 1 &lt;/P&gt;&lt;P&gt;Acct 1&lt;/P&gt;&lt;P&gt;balance - $1,000&lt;/P&gt;&lt;P&gt;Location - RI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Acct 2&lt;/P&gt;&lt;P&gt;balance -$2,000&lt;/P&gt;&lt;P&gt;Location - DC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like the report to show the customer location as DC based on the fact that for Cust ID x, the account with $2,000 is the largest balance, therefore the location will be DC. The end goal will be to have this grouped on one line.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 15:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89172#M8358</guid>
      <dc:creator>saltmarsh</dc:creator>
      <dc:date>2013-03-26T15:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value based on a customer ID</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89173#M8359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to achieve this in the Query Builder, using Grouping with the MAX aggregation.&amp;nbsp; See this blog post for a similar problem/solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://blogs.sas.com/content/sasdummy/2012/09/18/having-clause-fun-with-sas-enterprise-guide/" title="http://blogs.sas.com/content/sasdummy/2012/09/18/having-clause-fun-with-sas-enterprise-guide/"&gt; HAVING (clause) fun with SAS Enterprise Guide - The SAS Dummy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 15:08:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89173#M8359</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-03-26T15:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value based on a customer ID</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89174#M8360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on how your data is structured, it could have different approach. What does your table look like?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 15:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89174#M8360</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-03-26T15:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value based on a customer ID</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89175#M8361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With respect to the Max, this works as long as I don't have any other data that can cause the results to split again. I have some work to do on my grouping as it seems that I have to do multiple groups to make this work. Perhaps I should do the max earlier in an earlier query as opposed to later?This is one of the reasons I was looking for some sort of computed field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With respect to the table type. It's a flat file nothing too strange. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 17:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89175#M8361</guid>
      <dc:creator>saltmarsh</dc:creator>
      <dc:date>2013-03-26T17:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value based on a customer ID</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89176#M8362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With the information you provided it seems you could do this in one step.&lt;/P&gt;&lt;P&gt;Group by on cust id alone (not default grouping as suggested by EG).&lt;/P&gt;&lt;P&gt;Having balance = max(balance).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 19:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89176#M8362</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2013-03-26T19:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value based on a customer ID</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89177#M8363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with &lt;A __default_attr="119192" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; - I should have point out in my response that the GROUP/HAVING technique (&lt;A href="http://blogs.sas.com/content/sasdummy/2012/09/18/having-clause-fun-with-sas-enterprise-guide/"&gt;in the blog post&lt;/A&gt;) requires you to "uncheck" automatic grouping in the query builder to get the result you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 19:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89177#M8363</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-03-26T19:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the maximum value based on a customer ID</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89178#M8364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all. I was able to make it work based on your advice. One of the issues that I was having was Grouping in the wrong query. Once I figured that out, it works as advertised.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 20:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Finding-the-maximum-value-based-on-a-customer-ID/m-p/89178#M8364</guid>
      <dc:creator>saltmarsh</dc:creator>
      <dc:date>2013-03-26T20:58:58Z</dc:date>
    </item>
  </channel>
</rss>

