<?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 Slice Table by Data in Multiple Columns in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3761655#M123784</link>
    <description>&lt;P&gt;Hi everyone.&amp;nbsp; I was looking through similar posts but could not find a question seemingly the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a source table with rows defined for each "task" and then 3 columns indicating the person assigned to each position of the task (see example table).&amp;nbsp; As one person may be assigned to a different position, given the task, I am looking for a way to create a slicer by "person" that would allow to filter for all tasks assigned to that person, regardless of position.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Task&lt;/TD&gt;&lt;TD&gt;Position 1&lt;/TD&gt;&lt;TD&gt;Position 2&lt;/TD&gt;&lt;TD&gt;Position 3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Alex&lt;/TD&gt;&lt;TD&gt;Britney&lt;/TD&gt;&lt;TD&gt;Charles&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Britney&lt;/TD&gt;&lt;TD&gt;Charles&lt;/TD&gt;&lt;TD&gt;Darla&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Charles&lt;/TD&gt;&lt;TD&gt;Darla&lt;/TD&gt;&lt;TD&gt;Eric&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Alex&lt;/TD&gt;&lt;TD&gt;Charles&lt;/TD&gt;&lt;TD&gt;Darla&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Frank&lt;/TD&gt;&lt;TD&gt;Britney&lt;/TD&gt;&lt;TD&gt;Helen&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Gary&lt;/TD&gt;&lt;TD&gt;Eric&lt;/TD&gt;&lt;TD&gt;Frank&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I &lt;EM&gt;HAVE&amp;nbsp;&lt;/EM&gt;had success "unpivoting" the position columns in the power queary, essentailly making 6 rows into 18, and then rebuilding the "Position" columns with DAX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I rebuilt the table visual using the "last" values for each position:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Finally, I added a slicer for the created "Values" column (each person), and it WORKS!!!... however, the slicer then also removes the other assigned people to that task (which is definitely as expected).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My end goal is to create that table/slicer from the original data, but when a person is selected, I need to be able to see the other people assigned to that task.&amp;nbsp; I hope this makes sense!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 20:26:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-03-13T20:26:59Z</dc:date>
    <item>
      <title>Slice Table by Data in Multiple Columns</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3761655#M123784</link>
      <description>&lt;P&gt;Hi everyone.&amp;nbsp; I was looking through similar posts but could not find a question seemingly the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a source table with rows defined for each "task" and then 3 columns indicating the person assigned to each position of the task (see example table).&amp;nbsp; As one person may be assigned to a different position, given the task, I am looking for a way to create a slicer by "person" that would allow to filter for all tasks assigned to that person, regardless of position.&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Task&lt;/TD&gt;&lt;TD&gt;Position 1&lt;/TD&gt;&lt;TD&gt;Position 2&lt;/TD&gt;&lt;TD&gt;Position 3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;Alex&lt;/TD&gt;&lt;TD&gt;Britney&lt;/TD&gt;&lt;TD&gt;Charles&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Britney&lt;/TD&gt;&lt;TD&gt;Charles&lt;/TD&gt;&lt;TD&gt;Darla&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Charles&lt;/TD&gt;&lt;TD&gt;Darla&lt;/TD&gt;&lt;TD&gt;Eric&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Alex&lt;/TD&gt;&lt;TD&gt;Charles&lt;/TD&gt;&lt;TD&gt;Darla&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Frank&lt;/TD&gt;&lt;TD&gt;Britney&lt;/TD&gt;&lt;TD&gt;Helen&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;Gary&lt;/TD&gt;&lt;TD&gt;Eric&lt;/TD&gt;&lt;TD&gt;Frank&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I &lt;EM&gt;HAVE&amp;nbsp;&lt;/EM&gt;had success "unpivoting" the position columns in the power queary, essentailly making 6 rows into 18, and then rebuilding the "Position" columns with DAX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then, I rebuilt the table visual using the "last" values for each position:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Finally, I added a slicer for the created "Values" column (each person), and it WORKS!!!... however, the slicer then also removes the other assigned people to that task (which is definitely as expected).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My end goal is to create that table/slicer from the original data, but when a person is selected, I need to be able to see the other people assigned to that task.&amp;nbsp; I hope this makes sense!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 20:26:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3761655#M123784</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-13T20:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: Slice Table by Data in Multiple Columns</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3762097#M123803</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Please try this way.&lt;BR /&gt;I add a new table to create the slicer:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;There is no relationship between two tables:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Use this DAX to create a &lt;STRONG&gt;measure&lt;/STRONG&gt;:&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure = 
VAR _P = ALLSELECTED('Slicer'[Name])
RETURN
IF(
    ISFILTERED('Slicer'[Name]),
    IF(
        COUNTROWS(
            FILTER(
                _P,
                [Name] IN VALUES('Table'[Position 1]) ||
                [Name] IN VALUES('Table'[Position 2]) ||
                [Name] IN VALUES('Table'[Position 3])
            )
        ) &amp;gt; 0,
        1,
        0
    ),
    1
)&lt;/LI-CODE&gt;
&lt;P&gt;Set the settings according to the following screenshot:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;The final output is as below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Dino Tao&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 02:29:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3762097#M123803</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-14T02:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: Slice Table by Data in Multiple Columns</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3764103#M123862</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp; This worked perfectly!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 16:40:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3764103#M123862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-14T16:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Slice Table by Data in Multiple Columns</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3790108#M125048</link>
      <description>&lt;P&gt;Hello!&amp;nbsp; Me again!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, this fix has helped in getting the table to do as desired (slice by a name, and all relevant rows remain).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I need help knowing if I can carry this "slice/filter" across all other visuals.&amp;nbsp; For example with the sample data provided, if I wanted to add a card for counting total tasks, and then tasks assigned.&amp;nbsp; (ie. would display "6" when unfiltered, but when Britney is selected, the card would display "3").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried applying the same method of including that measure as a filter on the "card" but it does not let me change the settings to "is 1".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this makes sense.&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 21:26:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Slice-Table-by-Data-in-Multiple-Columns/m-p/3790108#M125048</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-25T21:26:31Z</dc:date>
    </item>
  </channel>
</rss>

