<?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 Need to create a TRUE/FALSE Column with multiple conditions across different fields in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1997954#M44329</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm trying to create a TRUE/FALSE column with conditions from 2 different columns. The "search" DAX function seems to work partially, but is not being as specific as I would like.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The logic for the formula is as follows:&lt;BR /&gt;&lt;BR /&gt;IF [meddislvl] contains "??O*" and [Total Time On Phone (s)Secs] is &amp;gt; 300, then TRUE, else FALSE&lt;BR /&gt;&lt;BR /&gt;The formula I used is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Omega Overage =IF( &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AND(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SEARCH ( "??O*", [meddislvl], 1, 0) &amp;gt; 0, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[Total Time On Phone (s)Secs] &amp;gt; 300&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"TRUE", "FALSE")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;However this only appears to work partially, as it ignores the 2 character limit and wildcard, and returns TRUE for any and all [meddislvl] that contains an "O" in it, regardless if it has 2 characters in front, or multiple characters after. An example of what I would specifically want is it to return TRUE for [meddislvls] that contain something like "77O01M" but it also returns TRUE for [meddislvls] like "06E01O" which I do not want (as the main identifier for an OMEGA, is the "O" being in the center of the [meddislvls] rather than the end, and the "E" represents an "ECHO" in this case).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I appreciate your time and assistance!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Aug 2021 13:40:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-04T13:40:05Z</dc:date>
    <item>
      <title>Need to create a TRUE/FALSE Column with multiple conditions across different fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1997954#M44329</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I'm trying to create a TRUE/FALSE column with conditions from 2 different columns. The "search" DAX function seems to work partially, but is not being as specific as I would like.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The logic for the formula is as follows:&lt;BR /&gt;&lt;BR /&gt;IF [meddislvl] contains "??O*" and [Total Time On Phone (s)Secs] is &amp;gt; 300, then TRUE, else FALSE&lt;BR /&gt;&lt;BR /&gt;The formula I used is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Omega Overage =IF( &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AND(&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SEARCH ( "??O*", [meddislvl], 1, 0) &amp;gt; 0, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[Total Time On Phone (s)Secs] &amp;gt; 300&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"TRUE", "FALSE")&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;However this only appears to work partially, as it ignores the 2 character limit and wildcard, and returns TRUE for any and all [meddislvl] that contains an "O" in it, regardless if it has 2 characters in front, or multiple characters after. An example of what I would specifically want is it to return TRUE for [meddislvls] that contain something like "77O01M" but it also returns TRUE for [meddislvls] like "06E01O" which I do not want (as the main identifier for an OMEGA, is the "O" being in the center of the [meddislvls] rather than the end, and the "E" represents an "ECHO" in this case).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I appreciate your time and assistance!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 13:40:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1997954#M44329</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-04T13:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a TRUE/FALSE Column with multiple conditions across different fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998029#M44334</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;How about:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Omega Overage =
  IF( 
    SEARCH ( "O", [meddislvl], 1, 0) &amp;gt; 2 &amp;amp;&amp;amp; [Total Time On Phone (s)Secs] &amp;gt; 300,
    "TRUE", 
    "FALSE"
  )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Aug 2021 14:10:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998029#M44334</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-08-04T14:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a TRUE/FALSE Column with multiple conditions across different fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998064#M44343</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;Unfortunately this still returns a TRUE for non-OMEGA events.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Seems its still returning TRUE for "any [meddislvl] that has an "O" in it ANYWHERE" rather than specifically with 2 characters in front of the "O" and with multiple characters after it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 14:30:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998064#M44343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-04T14:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a TRUE/FALSE Column with multiple conditions across different fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998116#M44344</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can you be more specific? You say "the main identifier for an OMEGA, is the "O" being in the &lt;EM&gt;&lt;STRONG&gt;center&lt;/STRONG&gt;&lt;/EM&gt; of the [meddislvls]", but in one of the examples you expect to return TRUE, i.e.&amp;nbsp;&lt;STRONG&gt;77O01M&lt;/STRONG&gt;, calling "O" the 'central' letter requires further definition and clarification.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 15:01:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998116#M44344</guid>
      <dc:creator>Jos_Woolley</dc:creator>
      <dc:date>2021-08-04T15:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a TRUE/FALSE Column with multiple conditions across different fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998222#M44349</link>
      <description>&lt;P&gt;It seems that the SEARCH function didn't like the multiple character wildcard "*" being in the formula, so I just used "?", added multiple searches within the formula and added an OR operator " || ", and that seems to have done the trick. Formula below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;Omega Overage = &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; IF(( &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; SEARCH ( "??O??", [meddislvl], 1, 0) ||&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; SEARCH ("??O???", [meddislvl], 1, 0)) &amp;amp;&amp;amp; [Total Time On Phone (s)Secs] &amp;gt; 300,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; "TRUE", &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; "FALSE"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Aug 2021 16:12:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998222#M44349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-04T16:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a TRUE/FALSE Column with multiple conditions across different fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998273#M44352</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;Oh, sorry, I read the original post wrong, how about:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Omega Overage =
VAR __Search = SEARCH ( "O", [meddislvl], 1, 0)
RETURN
  IF( 
     __Search = 3 &amp;amp;&amp;amp; LEN([meddislvl])&amp;gt;3 &amp;amp;&amp;amp; [Total Time On Phone (s)Secs] &amp;gt; 300,
    "TRUE", 
    "FALSE"
  )&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Aug 2021 16:42:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998273#M44352</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-08-04T16:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a TRUE/FALSE Column with multiple conditions across different fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998361#M44355</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;It seems this worked! If you have the time, could you explain how the logic/DAX works in this formula?&lt;BR /&gt;&lt;BR /&gt;I don't quite understand how "VAR __Search" or "RETURN" or "__SEARCH = 3" or "&amp;gt;3" works in this formula.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your assistance!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 17:28:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/1998361#M44355</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-04T17:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a TRUE/FALSE Column with multiple conditions across different fields</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/2000173#M44397</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;VAR and RETURN work together. Once you use a VAR (variable) then you have to use a RETURN statement. VAR creates a variable, in this case called "__Search". You can then use this "variable" in your DAX formula. The = 3 ensures that the O is in position 3, meaning 2 characters in front of it. The &amp;gt;3 means that the O is not at the end of the text (the * in your original formula). Only thing this does not do is handle cases like "aaaOaa".&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 12:13:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-create-a-TRUE-FALSE-Column-with-multiple-conditions/m-p/2000173#M44397</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-08-05T12:13:57Z</dc:date>
    </item>
  </channel>
</rss>

