<?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 IF statement with multiple columns and logical tests in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/951023#M10669</link>
    <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I’m trying to make a column with values from several other columns:&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Validation Result&lt;/STRONG&gt; &lt;STRONG&gt;OET&lt;/STRONG&gt; = “obligatory test” and &lt;STRONG&gt;Validation Date OET = &lt;/STRONG&gt;blank&lt;STRONG&gt;,&lt;/STRONG&gt; new column should say: “obligatory test”.&lt;/P&gt;&lt;P&gt;In the same column, I would like to have:&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to DET Validation Deadline&lt;/STRONG&gt; &amp;lt; 0, and &lt;STRONG&gt;Validation Date DET&lt;/STRONG&gt; = blank, “Not Timely”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to OET Validation Deadline&lt;/STRONG&gt; &amp;lt; 0, and &lt;STRONG&gt;Validation Date OET&lt;/STRONG&gt; = blank, “Not Timely”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to DET Validation Deadline&lt;/STRONG&gt; &amp;lt; 0, and =&amp;lt; 30, and &lt;STRONG&gt;Validation Date DET&lt;/STRONG&gt; = blank, “0-30”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to OET Validation Deadline&lt;/STRONG&gt; &amp;lt; 0, and =&amp;lt; 30, and &lt;STRONG&gt;Validation Date OET&lt;/STRONG&gt; = blank, “0-30”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to DET Validation Deadline&lt;/STRONG&gt; &amp;lt; 30, and =&amp;lt; 60, and &lt;STRONG&gt;Validation Date DET&lt;/STRONG&gt; = blank, “30-60”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to OET Validation Deadline&lt;/STRONG&gt; &amp;lt; 30, and =&amp;lt; 60, and &lt;STRONG&gt;Validation Date OET&lt;/STRONG&gt; = blank, “30-60”&lt;/P&gt;&lt;P&gt;Else, “over 60”&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All in all, the new column should be giving me either:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Obligatory test&lt;/LI&gt;&lt;LI&gt;Not Timely&lt;/LI&gt;&lt;LI&gt;0-30&lt;/LI&gt;&lt;LI&gt;30-60&lt;/LI&gt;&lt;LI&gt;Over 60&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is it possible to put this in 1 string, and therefore in one column, or is it better to approach this in a completely different way?&lt;/P&gt;&lt;P&gt;There are several other statuses in the “Validation Result DET” and “Validation Result OET” columns.&lt;/P&gt;&lt;P&gt;It is possible to have a finding which has “Effective” as a DET result and “Obligatory test” as OET result, so I figured I can’t just filter out all DET Effectives for example. Therefore I think I need to put it in one IF statement…&lt;/P&gt;&lt;P&gt;Does anybody know what’s best in this matter?&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 13:37:28 GMT</pubDate>
    <dc:creator>einrikr</dc:creator>
    <dc:date>2020-02-27T13:37:28Z</dc:date>
    <item>
      <title>IF statement with multiple columns and logical tests</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/951023#M10669</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I’m trying to make a column with values from several other columns:&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Validation Result&lt;/STRONG&gt; &lt;STRONG&gt;OET&lt;/STRONG&gt; = “obligatory test” and &lt;STRONG&gt;Validation Date OET = &lt;/STRONG&gt;blank&lt;STRONG&gt;,&lt;/STRONG&gt; new column should say: “obligatory test”.&lt;/P&gt;&lt;P&gt;In the same column, I would like to have:&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to DET Validation Deadline&lt;/STRONG&gt; &amp;lt; 0, and &lt;STRONG&gt;Validation Date DET&lt;/STRONG&gt; = blank, “Not Timely”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to OET Validation Deadline&lt;/STRONG&gt; &amp;lt; 0, and &lt;STRONG&gt;Validation Date OET&lt;/STRONG&gt; = blank, “Not Timely”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to DET Validation Deadline&lt;/STRONG&gt; &amp;lt; 0, and =&amp;lt; 30, and &lt;STRONG&gt;Validation Date DET&lt;/STRONG&gt; = blank, “0-30”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to OET Validation Deadline&lt;/STRONG&gt; &amp;lt; 0, and =&amp;lt; 30, and &lt;STRONG&gt;Validation Date OET&lt;/STRONG&gt; = blank, “0-30”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to DET Validation Deadline&lt;/STRONG&gt; &amp;lt; 30, and =&amp;lt; 60, and &lt;STRONG&gt;Validation Date DET&lt;/STRONG&gt; = blank, “30-60”&lt;/P&gt;&lt;P&gt;If &lt;STRONG&gt;Days to OET Validation Deadline&lt;/STRONG&gt; &amp;lt; 30, and =&amp;lt; 60, and &lt;STRONG&gt;Validation Date OET&lt;/STRONG&gt; = blank, “30-60”&lt;/P&gt;&lt;P&gt;Else, “over 60”&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All in all, the new column should be giving me either:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Obligatory test&lt;/LI&gt;&lt;LI&gt;Not Timely&lt;/LI&gt;&lt;LI&gt;0-30&lt;/LI&gt;&lt;LI&gt;30-60&lt;/LI&gt;&lt;LI&gt;Over 60&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is it possible to put this in 1 string, and therefore in one column, or is it better to approach this in a completely different way?&lt;/P&gt;&lt;P&gt;There are several other statuses in the “Validation Result DET” and “Validation Result OET” columns.&lt;/P&gt;&lt;P&gt;It is possible to have a finding which has “Effective” as a DET result and “Obligatory test” as OET result, so I figured I can’t just filter out all DET Effectives for example. Therefore I think I need to put it in one IF statement…&lt;/P&gt;&lt;P&gt;Does anybody know what’s best in this matter?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 13:37:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/951023#M10669</guid>
      <dc:creator>einrikr</dc:creator>
      <dc:date>2020-02-27T13:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement with multiple columns and logical tests</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/951061#M10671</link>
      <description>Even though it can be done in DAX, this is a job for Power Query. Please use PQ.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D</description>
      <pubDate>Thu, 27 Feb 2020 14:06:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/951061#M10671</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T14:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement with multiple columns and logical tests</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/951063#M10672</link>
      <description>&lt;P&gt;So something like the following?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
  SWITCH(
    TRUE(),
    [Validation Result OET] = “obligatory test” &amp;amp;&amp;amp; ISBLANK([Validation Date OET]), "obligatory test",
    [Days to DET Validation Deadline] &amp;lt; 0 &amp;amp;&amp;amp; ISBLANK([Validation Date DET]), “Not Timely”,
    [Days to OET Validation Deadline] &amp;lt; 0 &amp;amp;&amp;amp; ISBLANK([Validation Date OET]), “Not Timely”,
    [Days to DET Validation Deadline] &amp;lt;= 30 &amp;amp;&amp;amp; ISBLANK([Validation Date DET]), “0-30”,
    [Days to OET Validation Deadline] &amp;lt;= 30 &amp;amp;&amp;amp; ISBLANK([Validation Date OET]), “0-30”,
    [Days to DET Validation Deadline] &amp;gt; 30 &amp;amp;&amp;amp; [Days to DET Validation Deadline] &amp;lt;= 60 &amp;amp;&amp;amp; ISBLANK(Validation Date DET), "30-60",
    [Days to DET Validation Deadline] &amp;gt; 30 &amp;amp;&amp;amp; [Days to DET Validation Deadline] &amp;lt;= 60 &amp;amp;&amp;amp; ISBLANK([Validation Date OET]), “30-60”,
    “over 60”
  )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Warning, probably a few syntax errors hiding in there but this should provide the concept.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 14:08:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/951063#M10672</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-02-27T14:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement with multiple columns and logical tests</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/952386#M10746</link>
      <description>&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;This does exactly what I want it to do.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution did indeed give some syntax errors but they are easily fixed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 08:23:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-with-multiple-columns-and-logical-tests/m-p/952386#M10746</guid>
      <dc:creator>einrikr</dc:creator>
      <dc:date>2020-02-28T08:23:47Z</dc:date>
    </item>
  </channel>
</rss>

