<?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: 3 Month Rolling Averages - How to exclude the days with no sales in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1268177#M21308</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp; &amp;nbsp;Hi, thank you for your reply. Sorry, I used sales as a decent example for the same formula but there's been no change when I apply to batches. Basically, when we have zero batches, I don't want to include that day in the 3 month calculation.&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 Right First Time 3 Month Rolling %:=
VAR BATCHES = [No. of Batches (RFT) Fail] + [No. of Batches (RFT) Pass]
RETURN
AVERAGEX(
FILTER(
DATESINPERIOD( 'Primary Date Table'[Date] , LASTDATE( 'Primary Date Table'[Date] ) , -3, MONTH ) , 
BATCHES &amp;gt;0 
),
[Right First Time %]
)

&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Aug 2020 10:39:46 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-03T10:39:46Z</dc:date>
    <item>
      <title>3 Month Rolling Averages - How to exclude the days with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1265252#M21181</link>
      <description>&lt;P&gt;Hi All&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I modify this formula so that we're only averaging over days that have sales.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Average Sales 3 Month Rolling %:=&lt;BR /&gt;AVERAGEX(&lt;BR /&gt;DATESINPERIOD( 'Primary Date Table'[Date] , LASTDATE( 'Primary Date Table'[Date] ) , -3, MONTH ) , [Sales] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 31 Jul 2020 15:09:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1265252#M21181</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-31T15:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Month Rolling Averages - How to exclude the days with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1265356#M21186</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;&lt;LI-CODE lang="php"&gt;Measure =
AVERAGEX (
    FILTER (
        DATESINPERIOD ( Dates[Date], LASTDATE ( Dates[Date] ), -3, MONTH ),
        [Total Sales] &amp;gt; 0
    ),
    [Total Sales]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 31 Jul 2020 16:22:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1265356#M21186</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-07-31T16:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Month Rolling Averages - How to exclude the days with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1266523#M21239</link>
      <description>&lt;P&gt;what's your rationale for doing that? Isn't that skewing the true performance numbers? What if it was a regular day but without sales?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Aug 2020 20:25:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1266523#M21239</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-08-01T20:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Month Rolling Averages - How to exclude the days with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1267859#M21301</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm actually not using it for sales. I used Sales as a simpler way of explain it as most are familiar with it.&lt;/P&gt;&lt;P&gt;I'm calculating to exclude non-productive days. The average number of batches calculated over a 3 month period is being diluted and brought down by non-productive days (i.e the weekend). Sometimes we produce on weekends but if we took 90 days to calculate it for example, and everyday was productive, then it would make sense (the result might be an average of 85% because it's being diluted. But if we're dividing total no. of 'batches' and dividing it by the no. of productive days, say 90-12 (sundays) = 78, then the result would be higher, such as 92% (est) for example.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 08:13:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1267859#M21301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-03T08:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Month Rolling Averages - How to exclude the days with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1268177#M21308</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="236628" data-lia-user-login="AntrikshSharma" class="lia-mention lia-mention-user"&gt;AntrikshSharma&lt;/a&gt;&amp;nbsp; &amp;nbsp;Hi, thank you for your reply. Sorry, I used sales as a decent example for the same formula but there's been no change when I apply to batches. Basically, when we have zero batches, I don't want to include that day in the 3 month calculation.&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 Right First Time 3 Month Rolling %:=
VAR BATCHES = [No. of Batches (RFT) Fail] + [No. of Batches (RFT) Pass]
RETURN
AVERAGEX(
FILTER(
DATESINPERIOD( 'Primary Date Table'[Date] , LASTDATE( 'Primary Date Table'[Date] ) , -3, MONTH ) , 
BATCHES &amp;gt;0 
),
[Right First Time %]
)

&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 10:39:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1268177#M21308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-03T10:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Month Rolling Averages - How to exclude the days with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1268453#M21318</link>
      <description>&lt;P&gt;Use an external dates table where you can manually mark the days that had no batches. Then use that flag in your filters.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 12:26:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1268453#M21318</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-08-03T12:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: 3 Month Rolling Averages - How to exclude the days with no sales</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1269092#M21343</link>
      <description>&lt;P&gt;Hi, doesn't work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Average Right First Time 3 Month Rolling %:=
VAR RFT = 
CALCULATE (
    [Right First Time %],
    FILTER('Primary Date Table','Primary Date Table'[Batches (RFT)]&amp;gt;0)
)
RETURN

AVERAGEX( DATEADD('Primary Date Table'[Date],-3,MONTH)
    		,RFT)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;It's not going back -3 months.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Aug 2020 16:01:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/3-Month-Rolling-Averages-How-to-exclude-the-days-with-no-sales/m-p/1269092#M21343</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-03T16:01:53Z</dc:date>
    </item>
  </channel>
</rss>

