<?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 AND function on PowerBI slicers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857764#M91925</link>
    <description>&lt;P&gt;I created a slicer like this on PowerBI, but I would like the values to add up as "AND" conditions, rather than as "OR". For instance, I would like the values returned to be those where Chris&lt;SPAN&gt;&amp;nbsp;Gray AND Carlos Grillo are managers, rather than Chris Gray OR Carlos Grillo are managers. How can I do this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Oct 2022 22:50:26 GMT</pubDate>
    <dc:creator>ifarias</dc:creator>
    <dc:date>2022-10-23T22:50:26Z</dc:date>
    <item>
      <title>AND function on PowerBI slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857764#M91925</link>
      <description>&lt;P&gt;I created a slicer like this on PowerBI, but I would like the values to add up as "AND" conditions, rather than as "OR". For instance, I would like the values returned to be those where Chris&lt;SPAN&gt;&amp;nbsp;Gray AND Carlos Grillo are managers, rather than Chris Gray OR Carlos Grillo are managers. How can I do this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2022 22:50:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857764#M91925</guid>
      <dc:creator>ifarias</dc:creator>
      <dc:date>2022-10-23T22:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: AND function on PowerBI slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857783#M91927</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460784" data-lia-user-login="ifarias" class="lia-mention lia-mention-user"&gt;ifarias&lt;/a&gt;&amp;nbsp; can you&amp;nbsp;please provide some sample data&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2022 23:19:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857783#M91927</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-23T23:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: AND function on PowerBI slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857791#M91928</link>
      <description>&lt;P&gt;Hi, you can have multiple selection by pressing CTRL and selecting other values&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2022 23:26:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857791#M91928</guid>
      <dc:creator>AliakseiIvaneka</dc:creator>
      <dc:date>2022-10-23T23:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: AND function on PowerBI slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857797#M91929</link>
      <description>&lt;P&gt;still not sure but try :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Selected Measure Value = 
    SWITCH(SELECTEDVALUE('Measures for Slicer'[Measure])
        , "Managers", [Manager Names]
        , BLANK()
        )

Selected Measure Value (only for managers) = 
    // Get the number of managers you selected
    VAR SelectedmanagerCount = CALCULATE(COUNTROWS(VALUES(table[managers]))
                                        , ALLSELECTED(table))
    VAR output = SUMX (
        VALUES( table[manager] ),    //Get each manager in the current context
        VAR x = ADDCOLUMNS (            //For each manager, set a flag for whether 
                                        //there is data for each selected manager
                    ALLSELECTED ( table ),
                    "Flag", IF ( NOT (ISBLANK ( [Selected Measure Value] ), 1, 0 )
                    )
        //Count up the number of sales with data for each manager
        VAR salesWithDataFormanager = SUMX ( x, [Flag] )
 
        //If the number of managers for the facility matches the number of 
        //selected managers, include that value, otherwise exclude it.
        RETURN
            IF ( salesWithDataFormanager = SelectedmanagerCount, [Selected Measure Value] )
        )
    RETURN output&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Oct 2022 23:39:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2857797#M91929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-23T23:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: AND function on PowerBI slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2858208#M91947</link>
      <description>&lt;P&gt;Hello! Thanks for the suggestion, but doing that only returns the *value "OR" value* results, which is what I am trying to avoid.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2022 06:00:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/AND-function-on-PowerBI-slicers/m-p/2858208#M91947</guid>
      <dc:creator>ifarias</dc:creator>
      <dc:date>2022-10-24T06:00:34Z</dc:date>
    </item>
  </channel>
</rss>

