<?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: Expressions with 2 logical conditions? in Project data &amp; BIM</title>
    <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604685#M10486</link>
    <description>&lt;P&gt;Two different ways depending on your desire to IF or IFS&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2024 14:58:29 GMT</pubDate>
    <dc:creator>Xandros</dc:creator>
    <dc:date>2024-05-21T14:58:29Z</dc:date>
    <item>
      <title>Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604409#M10478</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.jpeg" style="width: 545px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/61038i671E01813793DF53/image-dimensions/545x369?v=v2" width="545" height="369" role="button" title="image.jpeg" alt="image.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to create an expression that derives a value based on the combination of 2 separate properties? &amp;nbsp;I've been able to use the IF and IFS functions with varying success, but they both only appear to allow the use of one logical condition per result. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ie: &amp;nbsp;The IF and IFS functions allow you to say: 'IF property A = "X", then use value "y".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I'm looking for is something that says:&amp;nbsp;'IF property A = "X", AND property B = "Z", then use value "y".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to recreate the function of a table with 2 axis, similar to the image above. &amp;nbsp;The resulting value is based on the combination of 2 other properties. &amp;nbsp;Is this possible with Expressions?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="grey"&gt;Operating system used: &lt;EM&gt;Mac Apple Silicon 14.5 Sonoma&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 15:59:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604409#M10478</guid>
      <dc:creator>Jeff Galbraith</dc:creator>
      <dc:date>2024-05-23T15:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604624#M10484</link>
      <description>&lt;P&gt;Yes, it's possible&lt;/P&gt;
&lt;PRE&gt;IFS(AND(PropertyA="X"; PropertyB ="Z");"Y")&lt;BR /&gt;IF(AND(PropertyA="X"; PropertyB ="Z");"Y";"-")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 07:47:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604624#M10484</guid>
      <dc:creator>Xandros</dc:creator>
      <dc:date>2024-05-21T07:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604681#M10485</link>
      <description>&lt;P&gt;Thanks Xandros, I will give that a try. Just to confirm, are you showing 2 different ways to achieve this, or do I need to use both the IFS and the IF expressions simultaneously?&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:29:34 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604681#M10485</guid>
      <dc:creator>Jeff Galbraith</dc:creator>
      <dc:date>2024-05-21T14:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604685#M10486</link>
      <description>&lt;P&gt;Two different ways depending on your desire to IF or IFS&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:58:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604685#M10486</guid>
      <dc:creator>Xandros</dc:creator>
      <dc:date>2024-05-21T14:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604690#M10487</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffGalbraith_0-1716307116648.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/61139i0F16D3CC7F25B684/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffGalbraith_0-1716307116648.png" alt="JeffGalbraith_0-1716307116648.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffGalbraith_1-1716307204359.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/61140i4ADC704D6D344DF6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JeffGalbraith_1-1716307204359.png" alt="JeffGalbraith_1-1716307204359.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I've entered the IFS expressions but I'm not getting any results. &amp;nbsp;The one item with the 1.25 in the right hand column was entered manually. &amp;nbsp;Three of the other items in the schedule should be pulling the same number 1.25 from the expressions since the LUX target is 500 for all three, and the Room Cavity Ratio for all three is less than 7, but more than 3.5. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Idea what I might be missing here?&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 16:02:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604690#M10487</guid>
      <dc:creator>Jeff Galbraith</dc:creator>
      <dc:date>2024-05-21T16:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604713#M10489</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/13701"&gt;@Jeff Galbraith&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it is a combination of both IF with a nested IFS.&lt;/P&gt;
&lt;P&gt;Let's see the example made for zones only with the expression for the value of GIL=500, although the rest of the expressions for the different values of global illuminance levels (150,200,300, etc) should be added.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;IF&lt;/STRONG&gt; &lt;STRONG&gt;(&lt;/STRONG&gt; {Property:ZONES/GIL} = 500; &lt;FONT color="#0000FF"&gt;&lt;EM&gt;IFS ( {Property:ZONES/RCR} &amp;lt;= 2; 0.8; {Property:ZONES/RCR} &amp;lt;= 3.5; 0.9; {Property:ZONES/RCR} &amp;lt;= 7; 1.25; {Property:ZONES/RCR} &amp;gt; 7; 1.55 )&lt;/EM&gt;&lt;/FONT&gt;; 0&lt;STRONG&gt; )&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RicardoLopez_3-1716316758805.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/61148iEE824B6CCE80C91D/image-size/large?v=v2&amp;amp;px=999" role="button" title="RicardoLopez_3-1716316758805.png" alt="RicardoLopez_3-1716316758805.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RicardoLopez_2-1716316491102.png" style="width: 539px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/61147i3A0CAAE9DBEC20C4/image-dimensions/539x365?v=v2" width="539" height="365" role="button" title="RicardoLopez_2-1716316491102.png" alt="RicardoLopez_2-1716316491102.png" /&gt;&lt;/span&gt;&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;</description>
      <pubDate>Thu, 23 May 2024 16:02:02 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604713#M10489</guid>
      <dc:creator>Ricardo Lopez</dc:creator>
      <dc:date>2024-05-23T16:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604718#M10490</link>
      <description>&lt;P&gt;Thanks Ricardo, that seems to work for one row of the table. &amp;nbsp;I assumed I would then need to write a new expression clause for each row of the table, However since the IF expression returns a 0 if none of the first expression clause criteria are met, it does not move onto the next expression clause, it just uses the 0. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I rewrite the first expression clause using IFS instead of IF, it returns 'undefined' but then appears to not go on to the next expression clause. &amp;nbsp;See below. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffGalbraith_0-1716318575171.png" style="width: 800px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/61150iD52A6F9D11021BA1/image-dimensions/800x76?v=v2" width="800" height="76" role="button" title="JeffGalbraith_0-1716318575171.png" alt="JeffGalbraith_0-1716318575171.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I get archicad to move on from the first clause to subsequent clauses if the conditions from the first clause are not met? &amp;nbsp;I expected that to be automatic based on what I've read elsewhere.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 19:12:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604718#M10490</guid>
      <dc:creator>Jeff Galbraith</dc:creator>
      <dc:date>2024-05-21T19:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604727#M10491</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/13701"&gt;@Jeff Galbraith&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then let's try just a nested expression with IF and IFS. It is quite boring but it could work:&lt;/P&gt;
&lt;P&gt;IF ( {Property:ZONES/GIL} = &lt;STRONG&gt;150&lt;/STRONG&gt;; IFS ( {Property:ZONES/RCR} &amp;lt;= 2; 0.35; {Property:ZONES/RCR} &amp;lt;= 3.5; 0.4; {Property:ZONES/RCR} &amp;lt;= 7; 0.5; {Property:ZONES/RCR} &amp;gt; 7; 0.65 ); IF ( {Property:ZONES/GIL} = &lt;STRONG&gt;200&lt;/STRONG&gt;; IFS ( {Property:ZONES/RCR} &amp;lt;= 2; 0.4; {Property:ZONES/RCR} &amp;lt;= 3.5; 0.5; {Property:ZONES/RCR} &amp;lt;= 7; 0.65; {Property:ZONES/RCR} &amp;gt; 7; 0.85 ); IF ( {Property:ZONES/GIL} = &lt;STRONG&gt;300&lt;/STRONG&gt;; IFS ( {Property:ZONES/RCR} &amp;lt;= 2; 0.55; {Property:ZONES/RCR} &amp;lt;= 3.5; 0.7; {Property:ZONES/RCR} &amp;lt;= 7; 0.85; {Property:ZONES/RCR} &amp;gt; 7; 1.20 ); IF ( {Property:ZONES/GIL} = &lt;STRONG&gt;400&lt;/STRONG&gt;; IFS ( {Property:ZONES/RCR} &amp;lt;= 2; 0.65; {Property:ZONES/RCR} &amp;lt;= 3.5; 0.8; {Property:ZONES/RCR} &amp;lt;= 7; 1.05; {Property:ZONES/RCR} &amp;gt; 7; 1.25 ); IF ( {Property:ZONES/GIL} = &lt;STRONG&gt;500&lt;/STRONG&gt;; IFS ( {Property:ZONES/RCR} &amp;lt;= 2; 0.80; {Property:ZONES/RCR} &amp;lt;= 3.5; 0.9; {Property:ZONES/RCR} &amp;lt;= 7; 1.25; {Property:ZONES/RCR} &amp;gt; 7; 1.55 ); IF ( {Property:ZONES/GIL} = &lt;STRONG&gt;600&lt;/STRONG&gt;; IFS ( {Property:ZONES/RCR} &amp;lt;= 2; 0.9; {Property:ZONES/RCR} &amp;lt;= 3.5; 1.05; {Property:ZONES/RCR} &amp;lt;= 7; 1.4; {Property:ZONES/RCR} &amp;gt; 7; 2 ); 0 ) ) ) ) ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RicardoLopez_0-1716323339439.png" style="width: 999px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/61151i6480F58142D79433/image-size/large?v=v2&amp;amp;px=999" role="button" title="RicardoLopez_0-1716323339439.png" alt="RicardoLopez_0-1716323339439.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2024 16:00:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604727#M10491</guid>
      <dc:creator>Ricardo Lopez</dc:creator>
      <dc:date>2024-05-23T16:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604731#M10492</link>
      <description>&lt;P&gt;It works!!!! &amp;nbsp;You sir, are a genius. &amp;nbsp;Thank you Ricardo!!!!&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 20:41:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604731#M10492</guid>
      <dc:creator>Jeff Galbraith</dc:creator>
      <dc:date>2024-05-21T20:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604733#M10493</link>
      <description>&lt;P&gt;Lovely expression, it reminded me of some things that should be improved:&lt;/P&gt;
&lt;P&gt;- &lt;STRONG&gt;keeping the line breaks&lt;/STRONG&gt; (you test something, apply the changes, and the neatly structured code breaks again into a single wall of text – why?)&lt;/P&gt;
&lt;P&gt;- &lt;STRONG&gt;syntax higlighting&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;- &lt;STRONG&gt;commenting&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without these,&amp;nbsp;there could be some cases when you are in the flow while creating the expression, fully understanding what goes where and how the logical steps are layered...:)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;...then something needs changing a month later and you are just staring at the screen in disbelief for minutes, because you need to untangle the mess again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 21:01:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604733#M10493</guid>
      <dc:creator>furtonb</dc:creator>
      <dc:date>2024-05-21T21:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Expressions with 2 logical conditions?</title>
      <link>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604735#M10494</link>
      <description>&lt;P&gt;I totally agree with you &lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/5793"&gt;@furtonb&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;
&lt;P&gt;A good practice would be to keep an internal log of notes with texts and images where we explain to our future self (or others) what we did.&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 21:13:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Project-data-BIM/Expressions-with-2-logical-conditions/m-p/604735#M10494</guid>
      <dc:creator>Ricardo Lopez</dc:creator>
      <dc:date>2024-05-21T21:13:14Z</dc:date>
    </item>
  </channel>
</rss>

