<?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 Distinct with multiselect slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4832693#M184591</link>
    <description>&lt;P&gt;How can I update the following to allow multiple selected values in a slicer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Distinct Apps = 
CALCULATE(
    DISTINCTCOUNT(AppUsage[AppName]), 
    FILTER(
        AppUsage, 
        AppUsage[UserName] &amp;lt;&amp;gt; SELECTEDVALUE(DeveloperTable[UserName]
        )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a report that shows app useage data.&amp;nbsp; The visuals show the apps and the number of users that access each app.&amp;nbsp; There is a slicer that has the names of developers and when I select a developer, the visuals updates and removes any app userage data with that developer's name.&amp;nbsp; There is also a card that uses the measure I posted above that shows the distict number of apps.&amp;nbsp; The measure works when selecting one developer at a time, but how do I get it to work with multiple selected developers?&lt;/P&gt;</description>
    <pubDate>Mon, 22 Sep 2025 19:25:38 GMT</pubDate>
    <dc:creator>AlexW24</dc:creator>
    <dc:date>2025-09-22T19:25:38Z</dc:date>
    <item>
      <title>Distinct with multiselect slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4832693#M184591</link>
      <description>&lt;P&gt;How can I update the following to allow multiple selected values in a slicer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Distinct Apps = 
CALCULATE(
    DISTINCTCOUNT(AppUsage[AppName]), 
    FILTER(
        AppUsage, 
        AppUsage[UserName] &amp;lt;&amp;gt; SELECTEDVALUE(DeveloperTable[UserName]
        )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a report that shows app useage data.&amp;nbsp; The visuals show the apps and the number of users that access each app.&amp;nbsp; There is a slicer that has the names of developers and when I select a developer, the visuals updates and removes any app userage data with that developer's name.&amp;nbsp; There is also a card that uses the measure I posted above that shows the distict number of apps.&amp;nbsp; The measure works when selecting one developer at a time, but how do I get it to work with multiple selected developers?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 19:25:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4832693#M184591</guid>
      <dc:creator>AlexW24</dc:creator>
      <dc:date>2025-09-22T19:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct with multiselect slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4832764#M184593</link>
      <description>&lt;P&gt;Hi&amp;nbsp;,&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You’re running into a classic SELECTEDVALUE limitation: it only returns a single value. With multiple developers selected, SELECTEDVALUE goes blank, so your filter logic no longer excludes the chosen names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use the IN operator against the selected list, and guard for the “no selection” case so you don’t exclude everyone by accident:&lt;/P&gt;&lt;PRE&gt;Distinct Apps =&lt;BR /&gt;VAR HasDevFilter =&lt;BR /&gt;ISFILTERED(DeveloperTable[UserName])&lt;BR /&gt;VAR SelectedDevs =&lt;BR /&gt;VALUES(DeveloperTable[UserName]) -- all developers currently selected in the slicer&lt;BR /&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;NOT HasDevFilter, -- nothing selected: show all apps (no exclusions)&lt;BR /&gt;DISTINCTCOUNT ( AppUsage[AppName] ),&lt;BR /&gt;CALCULATE (&lt;BR /&gt;DISTINCTCOUNT ( AppUsage[AppName] ),&lt;BR /&gt;REMOVEFILTERS ( DeveloperTable[UserName] ), -- ignore slicer’s direct filter first&lt;BR /&gt;NOT ( AppUsage[UserName] IN SelectedDevs ) -- then exclude selected developers&lt;BR /&gt;)&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1360638" data-lia-user-login="AlexW24" class="lia-mention lia-mention-user"&gt;AlexW24&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 22:05:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4832764#M184593</guid>
      <dc:creator>tayloramy</dc:creator>
      <dc:date>2025-09-22T22:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct with multiselect slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4833130#M184599</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1360638" data-lia-user-login="AlexW24" class="lia-mention lia-mention-user"&gt;AlexW24&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1340679" data-lia-user-login="tayloramy" class="lia-mention lia-mention-user"&gt;tayloramy&lt;/a&gt;, for your insights.&lt;/P&gt;
&lt;P&gt;I've reproduced the issue and received the following output. I've also attached the pbix file for your reference.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 08:39:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4833130#M184599</guid>
      <dc:creator>v-saisrao-msft</dc:creator>
      <dc:date>2025-09-23T08:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct with multiselect slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4833430#M184609</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1340679" data-lia-user-login="tayloramy" class="lia-mention lia-mention-user"&gt;tayloramy&lt;/a&gt;&amp;nbsp;Thank you for the solution!&amp;nbsp; Prior to coming here for help, I did try to make it work with the "IN" function but I was nowhere close to what you provided.&amp;nbsp; This seems like an overly complicated formula just to allow multiple selected items.&amp;nbsp; I hope Microsoft makes this easier in the future.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for the solution!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 13:16:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-with-multiselect-slicer/m-p/4833430#M184609</guid>
      <dc:creator>AlexW24</dc:creator>
      <dc:date>2025-09-23T13:16:18Z</dc:date>
    </item>
  </channel>
</rss>

