<?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 Slicer for certain rows/categories in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-for-certain-rows-categories/m-p/4140430#M164527</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add a slicer that uses a column from a table that only has 3 possible values (a, b, c). How do i create a slicer so that it will only show 1 and 2 in the slicer and no matter what I do with the slicer (have nothing selected, select one of them or both) it will always show me the rows that have c as their category?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 09 Sep 2024 09:58:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-09-09T09:58:29Z</dc:date>
    <item>
      <title>Slicer for certain rows/categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-for-certain-rows-categories/m-p/4140430#M164527</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to add a slicer that uses a column from a table that only has 3 possible values (a, b, c). How do i create a slicer so that it will only show 1 and 2 in the slicer and no matter what I do with the slicer (have nothing selected, select one of them or both) it will always show me the rows that have c as their category?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 09:58:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-for-certain-rows-categories/m-p/4140430#M164527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-09T09:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer for certain rows/categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-for-certain-rows-categories/m-p/4140473#M164528</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;, First create a measure&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;you can create a measure like this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ShowRows = &lt;BR /&gt;IF(&lt;BR /&gt;Table[Category] = "c",&lt;BR /&gt;1,&lt;BR /&gt;IF(&lt;BR /&gt;SELECTEDVALUE(SlicerTable[Category]) IN {"a", "b"},&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;)&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Create a separate table (SlicerTable) that contains only the values 'a' and 'b'&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;DAX&lt;BR /&gt;SlicerTable = &lt;BR /&gt;DATATABLE(&lt;BR /&gt;"Category",&lt;BR /&gt;STRING,&lt;BR /&gt;{&lt;BR /&gt;{"a"},&lt;BR /&gt;{"b"}&lt;BR /&gt;}&lt;BR /&gt;)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Add a slicer to your report using the SlicerTable[Category] column. This slicer will only show the values 'a' and 'b'.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Use the measure you created in step 1 to filter the visualizations. You can apply this measure as a visual-level filter, page-level filter, or report-level filter, depending on your needs. Set the filter to show only rows where the measure equals 1.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 10:35:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-for-certain-rows-categories/m-p/4140473#M164528</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2024-09-09T10:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer for certain rows/categories</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-for-certain-rows-categories/m-p/4141653#M164597</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try this:&lt;/P&gt;
&lt;P&gt;Here I create a set of sample:&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then add a calculated table:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 = {"AA","BB"}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;At last, create a measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MEASURE =
VAR _Slicer =
    CONCATENATEX ( 'Table 2', 'Table 2'[Value] ) &amp;amp; "CC"
RETURN
    IF ( CONTAINSSTRING ( _Slicer, SELECTEDVALUE ( 'Table'[ID] ) ), 1 )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add a Slicer with the [Value] field from Table 2, the result is as follow:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Zhengdong Xu&lt;BR /&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 02:04:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-for-certain-rows-categories/m-p/4141653#M164597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-09-10T02:04:44Z</dc:date>
    </item>
  </channel>
</rss>

