<?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: IF with multiple Contains in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3044746#M104615</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No problem, the below looks more readable than my original example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So there are two tables that contain these columns and rows, they're copies of eachother, the original has more columns and the duplicate just has the necessary columns.. The taxonomy4 coloumn is the affiliate list. The path taken column is the start to finish journey taken by the user.&lt;/P&gt;&lt;P&gt;The tables aren't linked at all, the duplicate is only for the splicer list as it wouldn't work when they were selected from the same table. But that selection just gets converted into a string so not sure if that'll be an issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the contains goes over the path_taken columns in the original table.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Jan 2023 10:05:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-01-26T10:05:43Z</dc:date>
    <item>
      <title>IF with multiple Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3043169#M104490</link>
      <description>&lt;P&gt;Similar to the below, I'm trying to make an IF statement with Contains but I am trying to count the times 2 (or more) affiliates appear in a customers click path together.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="IF CONTAINS WITH MULTIPLE VALUES" uid="736543" url="https://community.powerbi.com/t5/Desktop/IF-CONTAINS-WITH-MULTIPLE-VALUES/m-p/736543#U736543" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;Selection1= HUKD&lt;/P&gt;&lt;P&gt;Selection2= TCB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;OrderID&lt;/TD&gt;&lt;TD&gt;Path_Taken&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Order1&lt;/TD&gt;&lt;TD&gt;Step1 -&amp;gt; Step2 -&amp;gt; HUKD -&amp;gt; TCB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Order2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;Step1 -&amp;gt; Step2 -&amp;gt; HUKD -&amp;gt; TCB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Order3&lt;/TD&gt;&lt;TD&gt;Step1 -&amp;gt; Step2 -&amp;gt; HUKD -&amp;gt; TCB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Order4&lt;/TD&gt;&lt;TD&gt;HUKD-&amp;gt; Step2 -&amp;gt; HUKD -&amp;gt; Step4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Order5&lt;/TD&gt;&lt;TD&gt;Step1 -&amp;gt; Step2 -&amp;gt; Step3 -&amp;gt; TCB&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The count would equal 3 as they appear in the paths together 3 times.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Stringer Code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;StringerT4 = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CONVERT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Steps_AffiliateOnly&lt;/SPAN&gt;&lt;SPAN&gt;[taxonomy_4]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;STRING&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mutual counter Code:&lt;/P&gt;&lt;P&gt;Mutual =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AND&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CONTAINS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Steps_AffiliateOnly&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;Steps_AffiliateOnly&lt;/SPAN&gt;&lt;SPAN&gt;[path_taken]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Steps_AffiliateOnly&lt;/SPAN&gt;&lt;SPAN&gt;[StringerT4]&lt;/SPAN&gt;&lt;SPAN&gt;),(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CONTAINS&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Steps_AffiliateOnly_2'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Steps_AffiliateOnly_2'&lt;/SPAN&gt;&lt;SPAN&gt;[path_taken]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Steps_AffiliateOnly_2'&lt;/SPAN&gt;&lt;SPAN&gt;[StringerT4_Second]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;COUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Steps_AffiliateOnly&lt;/SPAN&gt;&lt;SPAN&gt;[order_id]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Logically it makes sense to me, but the output is not what i'm expecting.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance for any help&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Jan 2023 15:44:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3043169#M104490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-25T15:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: IF with multiple Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3043406#M104519</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;is the selection from a slicer? From which table/column?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 17:11:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3043406#M104519</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-25T17:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: IF with multiple Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3043440#M104524</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/user/viewprofilepage/user-id/317289" target="_blank"&gt;@tamerj1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;yes it's from a slicer, i use the stringer code to turn the selection into a string adn then use that string for the search.&lt;/P&gt;&lt;P&gt;Steps_affiliate_only and the affiliate_only_2 (duplicate or the original table) are the tables used. Path_taken is the column the contains is looking through&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 17:27:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3043440#M104524</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-25T17:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: IF with multiple Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3043539#M104534</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm havinf a difficulty picturing the situation. Would you please share a screenshot of the source table?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 18:10:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3043539#M104534</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-25T18:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: IF with multiple Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3044746#M104615</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No problem, the below looks more readable than my original example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;So there are two tables that contain these columns and rows, they're copies of eachother, the original has more columns and the duplicate just has the necessary columns.. The taxonomy4 coloumn is the affiliate list. The path taken column is the start to finish journey taken by the user.&lt;/P&gt;&lt;P&gt;The tables aren't linked at all, the duplicate is only for the splicer list as it wouldn't work when they were selected from the same table. But that selection just gets converted into a string so not sure if that'll be an issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then the contains goes over the path_taken columns in the original table.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 10:05:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3044746#M104615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-26T10:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF with multiple Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3044897#M104622</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Are you looking for something like this?&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;FilterMeasure = 
COUNTROWS ( 
    FILTER ( 
        Orders,
        VAR String = Orders[Path_Taken]
        VAR Items = SUBSTITUTE ( String, " -&amp;gt; ", "|" )
        VAR Length = COALESCE ( PATHLENGTH ( Items ), 1 )
        VAR T = GENERATESERIES ( 1, Length, 1 )
        RETURN
            ISEMPTY ( 
                EXCEPT ( 
                    VALUES ( Stations[Station] ) ,
                    SELECTCOLUMNS ( T, "@Station", PATHITEM ( Items, [Value] ) )
                )
            )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 26 Jan 2023 11:34:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3044897#M104622</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-26T11:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: IF with multiple Contains</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3045018#M104632</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works perfectly, thank you so much for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 12:40:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-with-multiple-Contains/m-p/3045018#M104632</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-26T12:40:55Z</dc:date>
    </item>
  </channel>
</rss>

