<?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: Evaluate record for multiple conditions in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaa-p/12668331#M4752824</link>
    <description>&lt;P&gt;I see. &lt;/P&gt;&lt;P&gt;Then you need to create 2 variables:&lt;/P&gt; 
&lt;PRE&gt;&lt;CODE&gt;[New] = If Year(EffDte) = 2022 Then "yes"
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;[Termed] =  If  Year(ExpDte) = 2022 Then "yes"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And 2 measures:&lt;/P&gt; 
&lt;PRE&gt;&lt;CODE&gt;[Count_New] = Count([ID]) WHERE [New] = "yes" 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;[Count_Termed] = Count([ID]) WHERE [Termed] = "yes" &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you create 2 horizontal tables where: &lt;/P&gt;&lt;P&gt;Table 1&lt;/P&gt;&lt;P&gt;column = [State]&lt;/P&gt;&lt;P&gt;Body = [Count_New]&lt;/P&gt;&lt;P&gt;Table 2&lt;/P&gt;&lt;P&gt;column = [State]&lt;/P&gt;&lt;P&gt;Body = [Count_Termed]&lt;/P&gt;&lt;P&gt;Now click on &lt;STRONG&gt;Table 2&lt;/STRONG&gt; and &lt;/P&gt;&lt;UL&gt;&lt;LI&gt; select &lt;STRONG&gt;Format Table &amp;gt; Layout &lt;/STRONG&gt;and set the position relative to&lt;STRONG&gt; Table 1&lt;/STRONG&gt; (so Table 2 is exactly under the Table 1)&lt;/LI&gt;&lt;LI&gt; select &lt;STRONG&gt;Format Table &amp;gt; General &lt;/STRONG&gt;and hide uncheck Table Headers&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Mon, 09 Jan 2023 07:59:55 GMT</pubDate>
    <dc:creator>krisa24</dc:creator>
    <dc:date>2023-01-09T07:59:55Z</dc:date>
    <item>
      <title>Evaluate record for multiple conditions</title>
      <link>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaq-p/12668328</link>
      <description>&lt;P&gt;Using webi 4.2:&lt;/P&gt;
  &lt;P&gt;Each record contains&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2123106-webi1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;I've created a variable, Category, using if conditions, but it only evaluates the record once. For example, ID 24 is identified as only New when it should be identified as both New and Termed. &lt;/P&gt;
  &lt;P&gt;=If [EffDate] &amp;gt;='1/1/2022' And [EffDate]&amp;lt;='12/31/2022' Then "New" ElseIf [ExpDte] &amp;gt;='1/1/2022' And [ExpDte]&amp;lt;='12/31/2022' Then "Termed" Else "NA"&lt;/P&gt;
  &lt;P&gt;I need to identify each ID as to whether the state was newly added during 2022 &lt;STRONG&gt;and&lt;/STRONG&gt; also whether the state was termed in 2022 (Category). The resulting table would look like:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2123107-webi2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Then for each state, I need to count the number of categories and format as follows:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/2123108-webi3.png" /&gt;&lt;/P&gt;
  &lt;P&gt;Any help in figuring this out would be appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 22:25:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaq-p/12668328</guid>
      <dc:creator>former_member795819</dc:creator>
      <dc:date>2023-01-05T22:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate record for multiple conditions</title>
      <link>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaa-p/12668329#M4752822</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;lets create variable Transaction Type:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;[Transaction Type] = If Year(EffDte) = 2022 Then "New"

Else If  Year(ExpDte) = 2022 Then "Termed"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you create variable count, however I am missing unique ID in your data set.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Total = count[unique_id]&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you can display the data in cross table, with &lt;/P&gt;&lt;P&gt;Rows = [Transaction Type]&lt;/P&gt;&lt;P&gt;Columns = [State]&lt;/P&gt;&lt;P&gt;Body = [Total]&lt;/P&gt;&lt;P&gt;The question is, how should be called the cases where the state was newly added during 2022 and also  was termed in 2022? They fall under "New" my solution.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 08:09:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaa-p/12668329#M4752822</guid>
      <dc:creator>krisa24</dc:creator>
      <dc:date>2023-01-06T08:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate record for multiple conditions</title>
      <link>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaa-p/12668330#M4752823</link>
      <description>&lt;P&gt;Thank you.  I've edited my question for clarity.  I need to evaluate each record multiple times.  ID 24 for AK needs to be identified as New and Termed.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 16:01:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaa-p/12668330#M4752823</guid>
      <dc:creator>former_member795819</dc:creator>
      <dc:date>2023-01-06T16:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Evaluate record for multiple conditions</title>
      <link>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaa-p/12668331#M4752824</link>
      <description>&lt;P&gt;I see. &lt;/P&gt;&lt;P&gt;Then you need to create 2 variables:&lt;/P&gt; 
&lt;PRE&gt;&lt;CODE&gt;[New] = If Year(EffDte) = 2022 Then "yes"
&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;[Termed] =  If  Year(ExpDte) = 2022 Then "yes"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And 2 measures:&lt;/P&gt; 
&lt;PRE&gt;&lt;CODE&gt;[Count_New] = Count([ID]) WHERE [New] = "yes" 

&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE&gt;[Count_Termed] = Count([ID]) WHERE [Termed] = "yes" &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then you create 2 horizontal tables where: &lt;/P&gt;&lt;P&gt;Table 1&lt;/P&gt;&lt;P&gt;column = [State]&lt;/P&gt;&lt;P&gt;Body = [Count_New]&lt;/P&gt;&lt;P&gt;Table 2&lt;/P&gt;&lt;P&gt;column = [State]&lt;/P&gt;&lt;P&gt;Body = [Count_Termed]&lt;/P&gt;&lt;P&gt;Now click on &lt;STRONG&gt;Table 2&lt;/STRONG&gt; and &lt;/P&gt;&lt;UL&gt;&lt;LI&gt; select &lt;STRONG&gt;Format Table &amp;gt; Layout &lt;/STRONG&gt;and set the position relative to&lt;STRONG&gt; Table 1&lt;/STRONG&gt; (so Table 2 is exactly under the Table 1)&lt;/LI&gt;&lt;LI&gt; select &lt;STRONG&gt;Format Table &amp;gt; General &lt;/STRONG&gt;and hide uncheck Table Headers&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 09 Jan 2023 07:59:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/evaluate-record-for-multiple-conditions/qaa-p/12668331#M4752824</guid>
      <dc:creator>krisa24</dc:creator>
      <dc:date>2023-01-09T07:59:55Z</dc:date>
    </item>
  </channel>
</rss>

