<?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: Adding more than 155 on a deep nested operator in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699441#M14441</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/277576"&gt;@bobbyfajardo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at your sample code snippet I believe you could completely get rid-off the long conditional IF-THEN logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Create&lt;/FONT&gt; My Month&lt;/FONT&gt;&lt;BR /&gt;Parse month from&amp;nbsp;&lt;FONT face="courier new,courier"&gt;ACAD_TERM_DESC&lt;/FONT&gt; along these lines:&lt;BR /&gt;
&lt;PRE&gt;IF ( 'My Season'n = 'Fall' )
   RETURN 9
ELSE (
   IF ( 'My Season'n = 'Wint' )
      RETURN 12
ELSE 3 )&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Create &lt;FONT face="courier new,courier"&gt;My Year&lt;/FONT&gt;&lt;BR /&gt;Parse year from&amp;nbsp;ACAD_TERM_DESC:&lt;BR /&gt;
&lt;PRE&gt;Parse(Substring('ACAD_TERM_DESC'n, 1, 4), 'COMMA5.')&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Create &lt;FONT face="courier new,courier"&gt;My Date&lt;/FONT&gt;&lt;BR /&gt;Create a new date variable:&lt;BR /&gt;
&lt;PRE&gt;DateFromMDY('My Month'n, 1, 'My Year'n)&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Your original long code can possibly be shortened now to&lt;BR /&gt;
&lt;PRE&gt;IF ( 'STUDENT LIFECYCLE'n In ('Degree Completed') )
RETURN 'My Date'n
ELSE .&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Please try this approach and let me know how it goes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Petri&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2020 11:02:41 GMT</pubDate>
    <dc:creator>PetriRoine</dc:creator>
    <dc:date>2020-11-17T11:02:41Z</dc:date>
    <item>
      <title>Adding more than 155 on a deep nested operator</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/697766#M14420</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm creating a custom calculated date based on 2 criteria. I was able to create the date however I received this error in the EDIT Calculation pop-up. (in Text view)&lt;BR /&gt;Error:&lt;BR /&gt;"The expression cannot be saved because an operator is nested too deeply. The current depth is 155 and the maximum depth is 100."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone else received this error?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&amp;nbsp; Rob&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 23:20:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/697766#M14420</guid>
      <dc:creator>bobbyfajardo</dc:creator>
      <dc:date>2020-11-09T23:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more than 155 on a deep nested operator</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/697771#M14421</link>
      <description>&lt;P&gt;Show the code.&lt;/P&gt;
&lt;P&gt;It sounds like you have way too many If/then/else statements. Widgets often have some limitation that code doesn't to help reduce the likelihood of sub-optimal code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your date is text and made with text manipulation you are almost certainly doing this the hard way.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 23:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/697771#M14421</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-09T23:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more than 155 on a deep nested operator</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/697902#M14423</link>
      <description>I am curious about your expression. Would you be willing to share it?&lt;BR /&gt;&lt;BR /&gt;FWIW, I have some expressions that have a *LOT* of IF/ELSEs and ORs, but I have not seen this error.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Sam</description>
      <pubDate>Tue, 10 Nov 2020 14:45:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/697902#M14423</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2020-11-10T14:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more than 155 on a deep nested operator</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699307#M14437</link>
      <description>&lt;P&gt;Correction: Adding more than 100 on a deep nested operator&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for offering to take a look at my calculated column code. The data is currently on the CAS Server.&amp;nbsp; I would certainly appreciate any assistance on getting this calculated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another option as a back-up. May need to make multiple tabs, but ideally would love to track the lifecycle from any possible beginning to end.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a sample:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IF ( ( 'STUDENT LIFECYCLE STAGE'n In (‘Degree Completed’) ) AND ('ACAD_TERM_DESC'n In ('2010 Fall') ) )&lt;BR /&gt;RETURN '1SEP2010'd&lt;BR /&gt;ELSE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;IF ( ( 'STUDENT LIFECYCLE STAGE'n In (‘Degree Completed’) ) AND ('ACAD_TERM_DESC'n In ('2011 Fall') ) )&lt;BR /&gt;RETURN '1SEP2011'd&lt;BR /&gt;ELSE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have it down to 126 deep nested operators.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 21:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699307#M14437</guid>
      <dc:creator>bobbyfajardo</dc:creator>
      <dc:date>2020-11-16T21:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more than 155 on a deep nested operator</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699320#M14438</link>
      <description>&lt;P&gt;If possible I'd like to do this on the CAS Server using one of the following tools.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS Data Studio - "Prepare Data"&lt;/P&gt;&lt;P&gt;SAS Studio - "Develop Code"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any suggestions as to how a I can make this a code I use in either of the following tools on CAS Server?&lt;/P&gt;&lt;P&gt;I'm trying to keep this column creation on one of the above mentioned tools.&amp;nbsp; This data is real-time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, Rob&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 22:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699320#M14438</guid>
      <dc:creator>bobbyfajardo</dc:creator>
      <dc:date>2020-11-16T22:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more than 155 on a deep nested operator</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699324#M14439</link>
      <description>&lt;P&gt;Hi Rob,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have permissions to update the source data in CAS, then I believe either of those tools should enable you to create the column you want. It may be easier and/or more elegant this way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Within VA, I believe that you might also be able to work around the issue by creating a calculated item to perform part of the logic, and then either a second calculated item or a custom category that is based on the first one to perform the rest. I can't promise this will work as I do not have a 155-deep expression to test with.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2020 22:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699324#M14439</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2020-11-16T22:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more than 155 on a deep nested operator</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699441#M14441</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/277576"&gt;@bobbyfajardo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking at your sample code snippet I believe you could completely get rid-off the long conditional IF-THEN logic.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Create&lt;/FONT&gt; My Month&lt;/FONT&gt;&lt;BR /&gt;Parse month from&amp;nbsp;&lt;FONT face="courier new,courier"&gt;ACAD_TERM_DESC&lt;/FONT&gt; along these lines:&lt;BR /&gt;
&lt;PRE&gt;IF ( 'My Season'n = 'Fall' )
   RETURN 9
ELSE (
   IF ( 'My Season'n = 'Wint' )
      RETURN 12
ELSE 3 )&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Create &lt;FONT face="courier new,courier"&gt;My Year&lt;/FONT&gt;&lt;BR /&gt;Parse year from&amp;nbsp;ACAD_TERM_DESC:&lt;BR /&gt;
&lt;PRE&gt;Parse(Substring('ACAD_TERM_DESC'n, 1, 4), 'COMMA5.')&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Create &lt;FONT face="courier new,courier"&gt;My Date&lt;/FONT&gt;&lt;BR /&gt;Create a new date variable:&lt;BR /&gt;
&lt;PRE&gt;DateFromMDY('My Month'n, 1, 'My Year'n)&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;Your original long code can possibly be shortened now to&lt;BR /&gt;
&lt;PRE&gt;IF ( 'STUDENT LIFECYCLE'n In ('Degree Completed') )
RETURN 'My Date'n
ELSE .&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Please try this approach and let me know how it goes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Petri&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 11:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699441#M14441</guid>
      <dc:creator>PetriRoine</dc:creator>
      <dc:date>2020-11-17T11:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding more than 155 on a deep nested operator</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699951#M14449</link>
      <description>&lt;P&gt;Petri,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gave me a great headstart!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had to make some minor edits.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;New Calculated Column&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MyDate&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DateFromMDY(Parse('Term_Month_Char'n, 'COMMA32.'), 1, Parse(&lt;BR /&gt;'ACAD_TERM_YR_SIMS'n, 'COMMA32.'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Much appreciated everyone!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best, Rob&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2020 18:56:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Adding-more-than-155-on-a-deep-nested-operator/m-p/699951#M14449</guid>
      <dc:creator>bobbyfajardo</dc:creator>
      <dc:date>2020-11-18T18:56:46Z</dc:date>
    </item>
  </channel>
</rss>

