<?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: Selectedvalue dax to work for multiple options selected in filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4056625#M160992</link>
    <description>&lt;P&gt;Thank You , this helped me&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jul 2024 14:10:38 GMT</pubDate>
    <dc:creator>han_rj</dc:creator>
    <dc:date>2024-07-23T14:10:38Z</dc:date>
    <item>
      <title>Selectedvalue dax to work for multiple options selected in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4046601#M160510</link>
      <description>&lt;P&gt;I want to write a dax to calculate discount to apply based on slicer selection [product slicer].&lt;BR /&gt;Example when Chair and Sofa are purchases I would like to apply a 12% discount but single selection using selectedvalues works but applying condition on multiple values obtained from the slicer does not.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 17:29:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4046601#M160510</guid>
      <dc:creator>han_rj</dc:creator>
      <dc:date>2024-07-17T17:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Selectedvalue dax to work for multiple options selected in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4046765#M160514</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="702570" data-lia-user-login="han_rj" class="lia-mention lia-mention-user"&gt;han_rj&lt;/a&gt;&amp;nbsp;Correct, SELECTEDVALUE returns BLANK if there is more than one row returned. You can just grab the values (DISTINCT) in the slicer and use the IN operator.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 19:45:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4046765#M160514</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-07-17T19:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Selectedvalue dax to work for multiple options selected in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4047433#M160539</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;, thank you for responding,Tried using distinct in a calculated table, I am missing something please can you correct me.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 04:42:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4047433#M160539</guid>
      <dc:creator>han_rj</dc:creator>
      <dc:date>2024-07-18T04:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Selectedvalue dax to work for multiple options selected in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4047671#M160551</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="702570" data-lia-user-login="han_rj" class="lia-mention lia-mention-user"&gt;han_rj&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try the following methods.&lt;/P&gt;&lt;P&gt;Measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _selectedprod =
    ALLSELECTED ( 'Table'[Product] )
VAR _IntersectCount =
            COUNTROWS ( INTERSECT ( _selectedprod, { "Chair", "Sofa" } ) )
VAR _List1Count = COUNTROWS ( _selectedprod )
VAR _result =
    SWITCH (
        TRUE (),
        SELECTEDVALUE('Table'[Product]) = "Chair", 10,
        SELECTEDVALUE('Table'[Product]) = "Sofa", 20,
        SELECTEDVALUE('Table'[Product]) = "Table", 15,
        _IntersectCount =_List1Count, 12, 20
    )
RETURN
   _result&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is this the result you expected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 06:27:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4047671#M160551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-18T06:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Selectedvalue dax to work for multiple options selected in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4047737#M160552</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;, Thank You for checking , The value should be 12 when chair and sofa is selected&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 06:45:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4047737#M160552</guid>
      <dc:creator>han_rj</dc:creator>
      <dc:date>2024-07-18T06:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Selectedvalue dax to work for multiple options selected in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4047788#M160553</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="702570" data-lia-user-login="han_rj" class="lia-mention lia-mention-user"&gt;han_rj&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can try the following methods.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure 2 = 
VAR _selectedprod =
    ALLSELECTED ( 'Table'[Product] )
VAR _IntersectCount =
            COUNTROWS ( INTERSECT ( _selectedprod, { "Chair", "Sofa" } ) )
VAR _List1Count = COUNTROWS ( _selectedprod )
VAR _result =
    IF( _IntersectCount =_List1Count &amp;amp;&amp;amp; _List1Count &amp;gt; 1,12,
    SWITCH (
        TRUE (),
        SELECTEDVALUE('Table'[Product]) = "Chair", 10,
        SELECTEDVALUE('Table'[Product]) = "Sofa", 20,
        SELECTEDVALUE('Table'[Product]) = "Table", 15,
        20
    ))
RETURN
   _result&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Is this the result you expected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 07:05:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4047788#M160553</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-07-18T07:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Selectedvalue dax to work for multiple options selected in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4048786#M160610</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="702570" data-lia-user-login="han_rj" class="lia-mention lia-mention-user"&gt;han_rj&lt;/a&gt;&amp;nbsp;Should be something like:&lt;/P&gt;
&lt;P&gt;VAR __selected = DISTINCT('Table'[Product])&lt;/P&gt;
&lt;P&gt;VAR __result = SWITCH( TRUE(), "Chair" IN __selected, 10, ...&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 14:17:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4048786#M160610</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-07-18T14:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Selectedvalue dax to work for multiple options selected in filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4056625#M160992</link>
      <description>&lt;P&gt;Thank You , this helped me&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 14:10:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selectedvalue-dax-to-work-for-multiple-options-selected-in/m-p/4056625#M160992</guid>
      <dc:creator>han_rj</dc:creator>
      <dc:date>2024-07-23T14:10:38Z</dc:date>
    </item>
  </channel>
</rss>

