<?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 of Median on TimeSeries in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Median-of-Median-on-TimeSeries/m-p/2853487#M91600</link>
    <description>&lt;P&gt;Please adjust the measure MyMedian to your needs. File attached.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2022 11:56:22 GMT</pubDate>
    <dc:creator>daXtreme</dc:creator>
    <dc:date>2022-10-20T11:56:22Z</dc:date>
    <item>
      <title>Median of Median on TimeSeries</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Median-of-Median-on-TimeSeries/m-p/2853349#M91577</link>
      <description>&lt;P&gt;Dear Community&lt;/P&gt;&lt;P&gt;I'm created a MEDIAN measure for salesPrice.&amp;nbsp;&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;As you can see on my screenshot, the blue line is the result I currently get.&lt;/P&gt;&lt;P&gt;But what I like to get is the Median based on the selected date range.&lt;/P&gt;&lt;P&gt;That would be 53.67 in my example, because this is the middle value (median) of this three numbers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the followning meaure but I don't work as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;Test_Medain =&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;Var Var_LastDate &amp;nbsp;= Max('Time'[DateKey])&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;Var Var_FirstDate = Min('Time'[DateKey])&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;Var x =&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;CALCULATE(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;&amp;nbsp; &amp;nbsp; MEDIAN(OrderLine[SalesPriceEUR])&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;&amp;nbsp; &amp;nbsp; ,Filter(&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ALL('Time')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ,AND('Time'[DateKey] &amp;gt;= Var_FirstDate ,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'Time'[DateKey] &amp;lt;= Var_LastDate&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;&amp;nbsp; &amp;nbsp; )&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2" color="#000000"&gt;Return (x) &amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&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;Any plans how I must modify my query?&lt;BR /&gt;&lt;BR /&gt;Thx&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 09:50:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Median-of-Median-on-TimeSeries/m-p/2853349#M91577</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-20T09:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Median of Median on TimeSeries</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Median-of-Median-on-TimeSeries/m-p/2853487#M91600</link>
      <description>&lt;P&gt;Please adjust the measure MyMedian to your needs. File attached.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2022 11:56:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Median-of-Median-on-TimeSeries/m-p/2853487#M91600</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-10-20T11:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Median of Median on TimeSeries</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Median-of-Median-on-TimeSeries/m-p/2853581#M91605</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This Statement works totally fine for me.&lt;BR /&gt;Many, many thanks.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;Var SalesPrice = Sum(Sales[SalePrice])&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;Var&lt;/SPAN&gt; &lt;SPAN&gt;v_X_Axis_SelectedTime&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;ISFILTERED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Time'&lt;/SPAN&gt;&lt;SPAN&gt;[DateValue]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;Var&lt;/SPAN&gt; &lt;SPAN&gt;v_Result&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;v_X_Axis_selectedTime&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MEDIANX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Time'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[SalesPrice]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;Return&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;v_Result&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 20 Oct 2022 12:14:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Median-of-Median-on-TimeSeries/m-p/2853581#M91605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-20T12:14:30Z</dc:date>
    </item>
  </channel>
</rss>

