<?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 Only show Sales Orders that only contains items of a specific type in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-show-Sales-Orders-that-only-contains-items-of-a-specific/m-p/3549065#M136496</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;I have a table containing data of this structure:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have put these three columns in a table visual. I want to create a slicer called "Only service items" that contains value TRUE/FALSE. If TRUE is picked in the slicer then I would like the visual to &lt;STRONG&gt;only&lt;/STRONG&gt; show SalesID's that &lt;STRONG&gt;only&lt;/STRONG&gt; contains rows of ItemType = Service.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Expected result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would anyone be so kind as to point me in the right direction.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Nov 2023 13:13:54 GMT</pubDate>
    <dc:creator>Hedan</dc:creator>
    <dc:date>2023-11-23T13:13:54Z</dc:date>
    <item>
      <title>Only show Sales Orders that only contains items of a specific type</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-show-Sales-Orders-that-only-contains-items-of-a-specific/m-p/3549065#M136496</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I have a table containing data of this structure:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have put these three columns in a table visual. I want to create a slicer called "Only service items" that contains value TRUE/FALSE. If TRUE is picked in the slicer then I would like the visual to &lt;STRONG&gt;only&lt;/STRONG&gt; show SalesID's that &lt;STRONG&gt;only&lt;/STRONG&gt; contains rows of ItemType = Service.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Expected result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would anyone be so kind as to point me in the right direction.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 13:13:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-show-Sales-Orders-that-only-contains-items-of-a-specific/m-p/3549065#M136496</guid>
      <dc:creator>Hedan</dc:creator>
      <dc:date>2023-11-23T13:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Only show Sales Orders that only contains items of a specific type</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-show-Sales-Orders-that-only-contains-items-of-a-specific/m-p/3549235#M136504</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564013" data-lia-user-login="Hedan" class="lia-mention lia-mention-user"&gt;Hedan&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;not sure if i fully get you, try to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) plot a slicer with a calculated table like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Slicer = 
SELECTCOLUMNS(
     {TRUE, FALSE},
    "OnlyServiceItem", [Value]
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) plot a table visual with all three columns and pull a measure like below to the filter pane of the visual and choose 1:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure = 
VAR _selection = SELECTEDVALUE(Slicer[OnlyServiceItem])
VAR _salesid = MAX(data[salesid])
VAR _list = 
CALCULATETABLE(
    VALUES(data[itemtype]),
    ALL(data),
    data[salesid] = _salesid
)
VAR _result =
IF(
    _selection=FALSE(),
    1,
    IF(
        _selection=TRUE 
            &amp;amp;&amp;amp; "Service" IN _list 
            &amp;amp;&amp;amp; COUNTROWS(_list)=1,
        1,0
    )
)
RETURN _result&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it worked like:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Nov 2023 14:26:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-show-Sales-Orders-that-only-contains-items-of-a-specific/m-p/3549235#M136504</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-11-23T14:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Only show Sales Orders that only contains items of a specific type</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-show-Sales-Orders-that-only-contains-items-of-a-specific/m-p/3562909#M137337</link>
      <description>&lt;P&gt;This worked, thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 11:07:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Only-show-Sales-Orders-that-only-contains-items-of-a-specific/m-p/3562909#M137337</guid>
      <dc:creator>Hedan</dc:creator>
      <dc:date>2023-12-01T11:07:26Z</dc:date>
    </item>
  </channel>
</rss>

