<?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: median -- ignore Slicer Selection in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2189222#M51142</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, I can roughly understand your requirement, you can try this measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Median =

var _value=MEDIANX(ALL(vwKPIMedianDoorToCT),[Minutes])

return

IF(_value=BLANK(),0,ROUND(_value,1))&lt;/LI-CODE&gt;
&lt;P&gt;Then you can create a slicer and a card chart to place this measure, and you will find that the measure will always display the value of the total median regardless of the selection of the slicer:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you can get what you want.&lt;/P&gt;
&lt;P&gt;You can download my test pbix file below&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Robert Qin&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Mon, 15 Nov 2021 02:31:46 GMT</pubDate>
    <dc:creator>v-robertq-msft</dc:creator>
    <dc:date>2021-11-15T02:31:46Z</dc:date>
    <item>
      <title>median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185971#M50973</link>
      <description>&lt;P&gt;this Measure get me the median based on Slicer Selection, Country&lt;/P&gt;&lt;P&gt;IF ( ROUND(MEDIAN(vwKPIMedianDoorToCT[Minutes]),1) = BLANK (), 0, ROUND(MEDIAN(vwKPIMedianDoorToCT[Minutes]),1) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to ignore the country , and also return the median for all countries , for comparison&amp;nbsp;&lt;/P&gt;&lt;P&gt;?? --&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ROUND&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MEDIAN&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;Calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;vwKPIMedianDoorToCT&lt;/SPAN&gt;&lt;SPAN&gt;[Minutes]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt; ) ),&lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:12:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185971#M50973</guid>
      <dc:creator>carlol</dc:creator>
      <dc:date>2021-11-11T20:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185981#M50974</link>
      <description>&lt;P&gt;I'd try writing it like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR MedianAllCountries =
    CALCULATE ( MEDIAN ( vwKPIMedianDoorToCT[Minutes] ), ALLSELECTED () )
RETURN
    IF ( ISBLANK ( MedianAllCountries ), 0, ROUND ( MedianAllCountries, 1 ) )
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:29:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185981#M50974</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-11-11T20:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185992#M50975</link>
      <description>&lt;P&gt;Great thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I want to ignore all slicer but the Date dimension , having issues with&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;e[Quarter]&lt;/SPAN&gt;&lt;SPAN&gt;))) brackets&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;MedianNational&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;MEDIAN&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;vwKPIMedianDoorToCT[Minutes]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DimDate&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;DimDate[CurrentYear]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;DimDate[Quarter]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;ISBLANK&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;MedianNational&lt;/SPAN&gt;&lt;SPAN&gt; ), &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;ROUND&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;MedianNational&lt;/SPAN&gt;&lt;SPAN&gt; , &lt;/SPAN&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt; ) )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:40:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185992#M50975</guid>
      <dc:creator>carlol</dc:creator>
      <dc:date>2021-11-11T20:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185996#M50976</link>
      <description>&lt;P&gt;You can add back in the tables you want to keep as filter context like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE ( MEDIAN ( vwKPIMedianDoorToCT[Minutes] ), ALLSELECTED (), DimDate )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Alternatively, use ALLSELECTED more narrowly only on the things you want to remove local filter context for. For example,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE ( MEDIAN ( vwKPIMedianDoorToCT[Minutes] ), ALLSELECTED ( Slicer[Country] ) )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:45:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185996#M50976</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-11-11T20:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185999#M50977</link>
      <description>&lt;P&gt;Great thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looks simple when written !&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:48:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2185999#M50977</guid>
      <dc:creator>carlol</dc:creator>
      <dc:date>2021-11-11T20:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2186000#M50978</link>
      <description>&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looks simple when coded&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:49:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2186000#M50978</guid>
      <dc:creator>carlol</dc:creator>
      <dc:date>2021-11-11T20:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2186019#M50979</link>
      <description>&lt;P&gt;This does not appear to be working ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I select all countries , 2021 Q1 Median is 75&lt;/P&gt;&lt;P&gt;If I select 1 country , (I want to igore this slicer) , it is 30 , ( I want to illustrate 75 regardless of country selection) but to still filter based on Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;MEDIAN&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;vwKPIMedianDoorToCT[Minutes]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt; (), &lt;/SPAN&gt;&lt;SPAN&gt;DimDate&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Nov 2021 20:58:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2186019#M50979</guid>
      <dc:creator>carlol</dc:creator>
      <dc:date>2021-11-11T20:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2189222#M51142</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, I can roughly understand your requirement, you can try this measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Median =

var _value=MEDIANX(ALL(vwKPIMedianDoorToCT),[Minutes])

return

IF(_value=BLANK(),0,ROUND(_value,1))&lt;/LI-CODE&gt;
&lt;P&gt;Then you can create a slicer and a card chart to place this measure, and you will find that the measure will always display the value of the total median regardless of the selection of the slicer:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you can get what you want.&lt;/P&gt;
&lt;P&gt;You can download my test pbix file below&lt;/P&gt;
&lt;P&gt;Thank you very much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Robert Qin&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 02:31:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2189222#M51142</guid>
      <dc:creator>v-robertq-msft</dc:creator>
      <dc:date>2021-11-15T02:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: median -- ignore Slicer Selection</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2190633#M51194</link>
      <description>&lt;P&gt;If you want to ignore a slicer, then you need to use ALL instead of ALLSELECTED.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See if this is any closer:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE (
    MEDIAN ( vwKPIMedianDoorToCT[Minutes] ),
    ALL ( vwKPIMedianDoorToCT ),
    DimDate
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 15:46:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/median-ignore-Slicer-Selection/m-p/2190633#M51194</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-11-15T15:46:52Z</dc:date>
    </item>
  </channel>
</rss>

