<?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: Filter for value and divide by average of a range in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134164#M16889</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4037" data-lia-user-login="stevedep" class="lia-mention lia-mention-user"&gt;stevedep&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help. I realized that it was partially my fault that it was showing that way because I had 5 products in the same table, so that is why my RANKING was jumping in increments of 5.&lt;/P&gt;&lt;P&gt;I am not able to attach the file so here is another screenshot. I got values, but they are not what I expect to get when I test it in excel.&lt;/P&gt;&lt;P&gt;Thank you&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Jun 2020 20:58:57 GMT</pubDate>
    <dc:creator>RDzeketey</dc:creator>
    <dc:date>2020-06-01T20:58:57Z</dc:date>
    <item>
      <title>Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1130189#M16742</link>
      <description>&lt;P&gt;I am trying to solve a problem. I have two tables and I need to filter for the current period value in Table 2 and divide it by the average of the filter of the first six months in Table 1.&lt;/P&gt;&lt;P&gt;Please see below for illutstration&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;</description>
      <pubDate>Fri, 29 May 2020 21:09:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1130189#M16742</guid>
      <dc:creator>RDzeketey</dc:creator>
      <dc:date>2020-05-29T21:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1130528#M16773</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This should work, perhaps not the most elegant solution, but this should work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 steps, first a ranking on the monthnumber, second calculate the average for the next 6 months and then do the division.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;rank formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;RANK = var sv = SELECTEDVALUE(Table2[YYYYMM])
var sv_tbl1 = SELECTEDVALUE(Table1[YYYYMM])
var rankk = CALCULATE(COUNTROWS(Table1);FILTER(ALL(Table1[YYYYMM]);Table1[YYYYMM] &amp;gt;= sv &amp;amp;&amp;amp; Table1[YYYYMM] &amp;lt;= sv_tbl1 ))
return
rankk&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;step 2, the calculation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;average = 
var filtervar = FILTER(Table1;[RANK] &amp;gt;= 1 &amp;amp;&amp;amp; [RANK] &amp;lt;= 6)
var selectedvalue = SELECTEDVALUE(Table2[Value])

return
selectedvalue / 
CALCULATE(
AVERAGE(Table1[Value]);filtervar) &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result is as expected:&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to the Power BI file is &lt;A href="https://1drv.ms/u/s!AvU6hhKLfmEcgddYm-kXRZgt9a3RHg?e=P0VXQt" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please accept as solution if this works for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 May 2020 08:58:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1130528#M16773</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-05-30T08:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1133730#M16874</link>
      <description>&lt;P&gt;When I use the RANK, this is the output I get and then the next part of the formula does not produce any values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 16:23:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1133730#M16874</guid>
      <dc:creator>RDzeketey</dc:creator>
      <dc:date>2020-06-01T16:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1133777#M16876</link>
      <description>&lt;P&gt;Can you share a file or full screenshot with your selections and attributes?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 16:42:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1133777#M16876</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-01T16:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1133907#M16883</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226519" data-lia-user-login="RDzeketey" class="lia-mention lia-mention-user"&gt;RDzeketey&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your YYYYMM is a Date Column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Lookup Table2 = LOOKUPVALUE(Table2[Value],Table2[YYYYMM],MAx(Table1[YYYYMM]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Average 6 months = &lt;/SPAN&gt;&lt;/DIV&gt;&amp;nbsp;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE(CALCULATE(SUM(Table1[Value]),DATESBETWEEN(Table1[YYYYMM],Max(Table1[YYYYMM]),MINX(DATEADD(All(Table1[YYYYMM]),5,MONTH),Table1[YYYYMM]))),6)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DivideValue = DIVIDE([Lookup Table2],[Average 6 months])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My datavalues are a little different from the one you shared. But this should work.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;Regards,&lt;BR /&gt;Harsh Nathani&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jun 2020 18:15:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1133907#M16883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-01T18:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134054#M16887</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Your method looks much simpler but the 6 month average only works for the first line (26,417). The second line 6 mo average does not compute correctly per your numbers. It should be a rolling 6 months(including current month)&amp;nbsp; calculation. PLease see below.&lt;/P&gt;&lt;P&gt;THank you&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 19:57:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134054#M16887</guid>
      <dc:creator>RDzeketey</dc:creator>
      <dc:date>2020-06-01T19:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134080#M16888</link>
      <description>&lt;P&gt;Can you share some more info on why my method is not working? Perhaps we can make it work?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 20:13:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134080#M16888</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-01T20:13:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134164#M16889</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4037" data-lia-user-login="stevedep" class="lia-mention lia-mention-user"&gt;stevedep&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help. I realized that it was partially my fault that it was showing that way because I had 5 products in the same table, so that is why my RANKING was jumping in increments of 5.&lt;/P&gt;&lt;P&gt;I am not able to attach the file so here is another screenshot. I got values, but they are not what I expect to get when I test it in excel.&lt;/P&gt;&lt;P&gt;Thank you&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 20:58:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134164#M16889</guid>
      <dc:creator>RDzeketey</dc:creator>
      <dc:date>2020-06-01T20:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134172#M16890</link>
      <description>&lt;P&gt;Van you share your excel logic? And an example with a difference?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 21:02:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134172#M16890</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-01T21:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134200#M16891</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this makes more sense.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2020 21:17:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134200#M16891</guid>
      <dc:creator>RDzeketey</dc:creator>
      <dc:date>2020-06-01T21:17:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134923#M16906</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 interesting findings;&lt;/P&gt;&lt;P&gt;1. My calculation was missing a 'VALUES' summary.&lt;/P&gt;&lt;P&gt;2. Your spreadsheet does not seem to calculate the average correctly? For the first 6 months it should be 3879,68?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Power BI file availabe &lt;A href="https://1drv.ms/u/s!AvU6hhKLfmEcgddYm-kXRZgt9a3RHg?e=AZfBcl" target="_self"&gt;here&lt;/A&gt;, Excelfile available &lt;A href="https://1drv.ms/x/s!AvU6hhKLfmEcgddmfennjCwVnwkqNg?e=vjbhio" target="_self"&gt;here&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 06:15:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1134923#M16906</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-02T06:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1135110#M16911</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226519" data-lia-user-login="RDzeketey" class="lia-mention lia-mention-user"&gt;RDzeketey&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Made some changes and I think it shold work fine now.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Average 6 months = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var _Mx = MINX(DATEADD(Table1[YYYYMM],6,MONTH),Table1[YYYYMM])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var _a = MAx(Table1[YYYYMM])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DIVIDE(CALCULATE(SUM(Table1[Value]),Filter(ALL(Table1),Table1[YYYYMM] &amp;gt;= _a &amp;amp;&amp;amp; Table1[YYYYMM] &amp;lt; _Mx)),6)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Lookup Table2 = LOOKUPVALUE(Table2[Value],Table2[YYYYMM],MAx(Table1[YYYYMM]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;DivideValue = DIVIDE([Lookup Table2],[Average 6 months])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Harsh Nathani&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;&lt;SPAN&gt;Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Jun 2020 07:29:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1135110#M16911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-02T07:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1135117#M16912</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226519" data-lia-user-login="RDzeketey" class="lia-mention lia-mention-user"&gt;RDzeketey&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question though, just a lil curious.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rolling 6 months is calculated on average of 6 months before that particular date. But you seem to be doing it the opposite i.e calculating avg 6 months after a date. Any specific reasons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just curious.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;HN&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 07:32:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1135117#M16912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-02T07:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1136143#M16940</link>
      <description>&lt;P&gt;Apologies, I meant forward looking. Current month plus 5. Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 13:46:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1136143#M16940</guid>
      <dc:creator>RDzeketey</dc:creator>
      <dc:date>2020-06-02T13:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1136434#M16948</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="4037" data-lia-user-login="stevedep" class="lia-mention lia-mention-user"&gt;stevedep&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Average works. However, for the Ratio, the math does not work.&lt;/P&gt;&lt;P&gt;6,472/3,879.68 = 1.69, not 1.62.&lt;/P&gt;&lt;P&gt;It looks to be taking the average of the entire table 1 (3987.22); and hence 6,472/3,987.22 = 1.62&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure how to fix that.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 15:34:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1136434#M16948</guid>
      <dc:creator>RDzeketey</dc:creator>
      <dc:date>2020-06-02T15:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1136491#M16950</link>
      <description>&lt;P&gt;Ah, I see now. Changed:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ratio = 
var filtervar = FILTER(ALLSELECTED(Table1[YYYYMM]);[RANK] &amp;gt;= 1 &amp;amp;&amp;amp; [RANK] &amp;lt;= 6)
var selectedvalue = SELECTEDVALUE(Table2[Value])
var v_avg = CALCULATE(CALCULATE(
AVERAGE(Table1[Value]));filtervar) 
return
selectedvalue 
/v_avg&lt;/LI-CODE&gt;&lt;P&gt;Giving the expected result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File available &lt;A href="https://1drv.ms/u/s!AvU6hhKLfmEcgddYm-kXRZgt9a3RHg?e=fDRJX1" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2020 15:56:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1136491#M16950</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-02T15:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Filter for value and divide by average of a range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1138835#M17016</link>
      <description>&lt;P&gt;This is the adjusted code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;AverageNext6Months = 
var v_dates =  DATESINPERIOD( DateNew[Date]; MAX( DateNew[Date] ); +5;  MONTH )
return
AVERAGEX(v_dates;CALCULATE(SUM(Forecast[Forecast Value])))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ratio:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Ratio = MAX(OH[OH Value]) / [AverageNext6Months] &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2020 17:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-for-value-and-divide-by-average-of-a-range/m-p/1138835#M17016</guid>
      <dc:creator>stevedep</dc:creator>
      <dc:date>2020-06-03T17:41:01Z</dc:date>
    </item>
  </channel>
</rss>

