<?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: Slicer to filter two column without context in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-to-filter-two-column-without-context/m-p/2407250#M63264</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;, Thanks for your solution. It is working as expected however, when we only have the buyer, seller and cost columns in the table, the silcer is not working. For that, I have added an additional field (although not required in that particular table) for the slicer to work.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Mar 2022 17:01:04 GMT</pubDate>
    <dc:creator>sonm10</dc:creator>
    <dc:date>2022-03-21T17:01:04Z</dc:date>
    <item>
      <title>Slicer to filter two column without context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-to-filter-two-column-without-context/m-p/2403877#M63043</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a sample dataset as follows:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Type&lt;/TD&gt;&lt;TD&gt;Seller&lt;/TD&gt;&lt;TD&gt;Buyer&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product1&lt;/TD&gt;&lt;TD&gt;Cat1&lt;/TD&gt;&lt;TD&gt;Type1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product2&lt;/TD&gt;&lt;TD&gt;Cat2&lt;/TD&gt;&lt;TD&gt;Type1&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product3&lt;/TD&gt;&lt;TD&gt;Cat2&lt;/TD&gt;&lt;TD&gt;Type2&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product4&lt;/TD&gt;&lt;TD&gt;Cat1&lt;/TD&gt;&lt;TD&gt;Type3&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Product5&lt;/TD&gt;&lt;TD&gt;Cat3&lt;/TD&gt;&lt;TD&gt;Type3&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a column Seller and Buyer, that contains their name. A seller for one product can be a buyer for another product and vice versa. So basically, the two coumns will have many similar values. I need to have a single slicer to filter both these columns. The slicer have to be the union of these two column and should filter the rows if either or both the column has the slicer value.&lt;/P&gt;&lt;P&gt;I have implemented a solution as per this: &lt;A href="https://community.powerbi.com/t5/Desktop/Once-Slicer-for-multiple-columns/m-p/430979/highlight/true#M198545" target="_blank" rel="noopener"&gt;Solved: Re: Once Slicer for multiple columns - Microsoft Power BI Community&lt;/A&gt;, where we create a measure on the union column. It was working as expected when the said two columns are available in the visual. The issue arises when the context changes, such as if we only select the Product and Amount fields in a table, the slicer will not have any effect. I require the slicer to filter the rows regardless of the context.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 18:57:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-to-filter-two-column-without-context/m-p/2403877#M63043</guid>
      <dc:creator>sonm10</dc:creator>
      <dc:date>2022-03-18T18:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer to filter two column without context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-to-filter-two-column-without-context/m-p/2403985#M63046</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="235355" data-lia-user-login="sonm10" class="lia-mention lia-mention-user"&gt;sonm10&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I created a new table combining Seller and Buyer with distinct values then created a measure that identifies if the selected values (One or more) is found then filters the table. Check the attached file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Exists = 
VAR __SellerBuyerSelected = VALUES( BuyerSeller[Buyer] )
RETURN
    CALCULATE(
        COUNTROWS(table1),
        Table1[Buyer] IN __SellerBuyerSelected || Table1[Seller] IN __SellerBuyerSelected
    )&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 20:28:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-to-filter-two-column-without-context/m-p/2403985#M63046</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2022-03-18T20:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: Slicer to filter two column without context</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-to-filter-two-column-without-context/m-p/2407250#M63264</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;, Thanks for your solution. It is working as expected however, when we only have the buyer, seller and cost columns in the table, the silcer is not working. For that, I have added an additional field (although not required in that particular table) for the slicer to work.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 17:01:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Slicer-to-filter-two-column-without-context/m-p/2407250#M63264</guid>
      <dc:creator>sonm10</dc:creator>
      <dc:date>2022-03-21T17:01:04Z</dc:date>
    </item>
  </channel>
</rss>

