<?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: Multiple Select option in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3493210#M133783</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="572946" data-lia-user-login="ShivGC" class="lia-mention lia-mention-user"&gt;ShivGC&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;For Selectedvalue() function, it r&lt;SPAN&gt;eturn the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When you select more than one value in slicer, it will return blank when not set the second parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more details, you can read related document:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/dax/selectedvalue-function" target="_blank"&gt;SELECTEDVALUE function - DAX | Microsoft Learn&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Community Support Team_Binbin Yu&lt;BR /&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2023 07:54:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-10-24T07:54:33Z</dc:date>
    <item>
      <title>Multiple Select option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3485304#M133355</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I couldn't quite find the answer to my question online so I decided to drop the question on the forums myself.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables that have no relationship&lt;BR /&gt;&lt;BR /&gt;Client (Distinct) Table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Client&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Client 1&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Client 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Client 3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Client Information Table:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Client&amp;nbsp;&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Sale&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Item name&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Client 1&lt;/TD&gt;&lt;TD&gt;50&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Pencil&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Client 1&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Sharpner&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Client 2&lt;/TD&gt;&lt;TD&gt;70&lt;/TD&gt;&lt;TD&gt;Calculator&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Client 3&lt;/TD&gt;&lt;TD&gt;75&lt;/TD&gt;&lt;TD&gt;Pencil&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Client 3&lt;/TD&gt;&lt;TD&gt;80&lt;/TD&gt;&lt;TD&gt;Sharpner&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created a DAX code (that works) which highlights a selected client one colour and their competitors a different colour which is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Client Distiction = 
var selectedClient = SELECTEDVALUE('Client Distinct Table'[Client])
return 
SWITCH(
 SELECTEDVALUE(Client Information Table[Client])=selectedClient, 
 TRUE, 
 "#006D9E" , 
 "#A6E2EF" 
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code works if you use two different filters and put the client distinct table 'client' coloumn in the first filter, and the client infromation table 'client' column in the second filter. If you select one client in the first filter, then it will highlight that client if selected in the second filter.&lt;BR /&gt;&lt;BR /&gt;However, if you select multiple clients in the first filter it will not longer colour the selected clients in the chart. Is there a way to fix this? So, if you select client 1 and client 2, both these clients will be highlighted in a scatter graph/bar chart/line chart,&amp;nbsp; and the rest of the clients will be highlighted another colour.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thank you for your help. Look forward to the responses.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am a beginner so please explain it as simply as possible &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2023 10:02:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3485304#M133355</guid>
      <dc:creator>ShivGC</dc:creator>
      <dc:date>2023-10-19T10:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3489281#M133546</link>
      <description>&lt;P&gt;You may want to look at the "Decomposition tree"&amp;nbsp; visual.&amp;nbsp; It can give you these answers much faster.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 20:22:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3489281#M133546</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-10-21T20:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3490202#M133597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="572946" data-lia-user-login="ShivGC" class="lia-mention lia-mention-user"&gt;ShivGC&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please try to create a measure with below dax formula:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
VAR _a =
    SELECTEDVALUE ( 'Client  Information'[Client ] )
VAR tmp =
    SELECTCOLUMNS ( Client, "Client Name", [Client] )
VAR _str =
    CONCATENATEX ( tmp, [Client Name], "," )
VAR _result =
    IF ( CONTAINSSTRING ( _str, _a ), "#006D9E", "#A6E2EF" )
RETURN
    _result
&lt;/LI-CODE&gt;
&lt;P&gt;Add a scatter visual with Client Information table, and set the markers color&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Please refer the attached .pbix file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team_Binbin Yu&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 02:30:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3490202#M133597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-23T02:30:14Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3491660#M133691</link>
      <description>&lt;P&gt;Do you know why the Selected value function does not work for multiple select?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I wanted to use an alternative of the selected value so I could use it in the calculate function too.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I do not undertsand why Selectedvalue will not work when I select more than one value?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 14:30:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3491660#M133691</guid>
      <dc:creator>ShivGC</dc:creator>
      <dc:date>2023-10-23T14:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3491679#M133693</link>
      <description>&lt;LI-CODE lang="markup"&gt;Do you know why the Selected value function does not work for multiple select? &lt;/LI-CODE&gt;
&lt;P&gt;For that you need to use VALUES()&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 14:40:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3491679#M133693</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-10-23T14:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3493210#M133783</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="572946" data-lia-user-login="ShivGC" class="lia-mention lia-mention-user"&gt;ShivGC&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;For Selectedvalue() function, it r&lt;SPAN&gt;eturn the value when the context for columnName has been filtered down to one distinct value only. Otherwise returns alternateResult.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When you select more than one value in slicer, it will return blank when not set the second parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more details, you can read related document:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/dax/selectedvalue-function" target="_blank"&gt;SELECTEDVALUE function - DAX | Microsoft Learn&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;BR /&gt;Community Support Team_Binbin Yu&lt;BR /&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 07:54:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3493210#M133783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-24T07:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Select option</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3493450#M133799</link>
      <description>&lt;LI-CODE lang="markup"&gt;IsTable1InTable2 = 
IF(
    COUNTROWS(
        FILTER(
            'Table1',
            'Table1'[ColumnName] IN VALUES('Table2'[ColumnName])
        )
    ) &amp;gt; 0,
    TRUE,
    FALSE
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Here is a code that worked for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2023 09:29:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Multiple-Select-option/m-p/3493450#M133799</guid>
      <dc:creator>ShivGC</dc:creator>
      <dc:date>2023-10-24T09:29:08Z</dc:date>
    </item>
  </channel>
</rss>

