<?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: Create a new Calclation based on multiple conditions in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/987491#M18964</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create a new data item (I called it Race_Date_Numeric) with the following expression:&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;TreatAs&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_Number_&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Race_Date&lt;/SPAN&gt;&lt;SPAN&gt;). Set its aggregation to something non-additive like minimum.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;2. Use this in a rank in the list table to only display the Race_Date with the highest value for Race_Date_Numeric.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;This should do what you expect!&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Nithin&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 07 May 2026 15:41:01 GMT</pubDate>
    <dc:creator>NithinRamu</dc:creator>
    <dc:date>2026-05-07T15:41:01Z</dc:date>
    <item>
      <title>Create a new Calclation based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/985801#M18953</link>
      <description>&lt;P&gt;Hi! I've been struggling with a new calculation that I want to add to a report.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm creating a F1 Dataset that I want to share with my colleagues, and I want to show the most dominant Constructor Teams over the last 78 years.&lt;/P&gt;
&lt;P&gt;Currently, I want to extract some variable values based on a nested condition. I have the following logic:&lt;BR /&gt;&lt;BR /&gt;I have a Constructor_position numeric variable, with values ranging from 1 to 21 (including missing values), since this is a rank, 1 would correspond to first place, 2 to second place and so on. The issue arises when I want to extract only the constructor champion for each season. For example, if I select the 2021 Season, the Constructor Champion would be the team that has that "1" record for the Constructor_position, but I have a Race_Date Variable which has the values of each race, meaning that I would have multiple "1"s if I only extract the position itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to accomplish this using the following logic:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"If Constructor_Position = 1 and Last_Race_Date by Season&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Return Constructor_Position&lt;BR /&gt;Else Missing"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or maybe I'm missing something or overcomplicating the calculation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I Attached an example of the dataset if is of any help. In the file, Vanwall would be the constructor champion in 1958.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 19:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/985801#M18953</guid>
      <dc:creator>Ch_Jazhiel</dc:creator>
      <dc:date>2026-04-01T19:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Calclation based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/985803#M18954</link>
      <description>&lt;P&gt;If I am understanding you properly, you will have to sort the data by the season and by the date of the race. Then you want to use the LAST. construct in SAS to in order to identify the last race of the season. Then it is easy to extract the information you want.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;See the documentation &lt;A href="https://go.documentation.sas.com/doc/en/lrcon/9.4/n01a08zkzy5igbn173zjz82zsi1s.htm" target="_self"&gt;here&lt;/A&gt;, and the examples will be helpful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many people (including me) refuse to, or cannot, download attachments. The proper way to include a data set it to provide&amp;nbsp;&lt;EM&gt;working&lt;/EM&gt; SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;examples and instructions&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2026 20:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/985803#M18954</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2026-04-01T20:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Calclation based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/987491#M18964</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create a new data item (I called it Race_Date_Numeric) with the following expression:&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;TreatAs&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;_Number_&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Race_Date&lt;/SPAN&gt;&lt;SPAN&gt;). Set its aggregation to something non-additive like minimum.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;2. Use this in a rank in the list table to only display the Race_Date with the highest value for Race_Date_Numeric.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;This should do what you expect!&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Nithin&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 May 2026 15:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/987491#M18964</guid>
      <dc:creator>NithinRamu</dc:creator>
      <dc:date>2026-05-07T15:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Calclation based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/987499#M18966</link>
      <description>I did part of this and it worked, but I noticed that my logic was correct up to some point, after further investigation I had missing observations but they were related due to historical events, not missing at random.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Thu, 07 May 2026 17:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/987499#M18966</guid>
      <dc:creator>Ch_Jazhiel</dc:creator>
      <dc:date>2026-05-07T17:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create a new Calclation based on multiple conditions</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/987500#M18967</link>
      <description>Thank you! This is a great example of what I was expecting as a result, however, after further investigation, I noticed that I had missing observations, but they were related due to historical events, not missing at random, however, this is a great workaround.&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Thu, 07 May 2026 17:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Create-a-new-Calclation-based-on-multiple-conditions/m-p/987500#M18967</guid>
      <dc:creator>Ch_Jazhiel</dc:creator>
      <dc:date>2026-05-07T17:16:23Z</dc:date>
    </item>
  </channel>
</rss>

