<?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: Average daily sales with filter out dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809073#M88785</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the relationship is many to one. I created an index for each row in Promotions and joined it to ProductID in my Sales table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2022 18:40:44 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-09-30T18:40:44Z</dc:date>
    <item>
      <title>Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2808835#M88763</link>
      <description>&lt;P&gt;I'm measuring promotional effectiveness and want to find the average daily amount of $ made of certain products when they're not on promotion.&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;I've got the following measure for calculating average $ made each week:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'DimDate'&lt;/SPAN&gt;&lt;SPAN&gt;[Day]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;[Sales Total ($)]&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;What I need is a filter that excludes any sales made, of the products included in the promotion, and their respective dates.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have this measure with filter for calculating all $ made on promotion products during their respective dates:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt; ( Sales&lt;/SPAN&gt;&lt;SPAN&gt;[Sales_Value]&lt;/SPAN&gt;&lt;SPAN&gt; ),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;DimDate&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;DimDate&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;MIN&lt;/SPAN&gt;&lt;SPAN&gt;( &lt;/SPAN&gt;&lt;SPAN&gt;DimPromotion&lt;/SPAN&gt;&lt;SPAN&gt;[StartDate]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;DimDate&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;DimPromotion&lt;/SPAN&gt;&lt;SPAN&gt;[EndDate]&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;I've tried changing the format to exclude those dates instead but it's results in blank values.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you for any guidance.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 16:16:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2808835#M88763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-30T16:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2808950#M88773</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;what is the relationship between Sales and DimPromotion?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 17:37:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2808950#M88773</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-30T17:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809073#M88785</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the relationship is many to one. I created an index for each row in Promotions and joined it to ProductID in my Sales table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 18:40:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809073#M88785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-30T18:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809091#M88790</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Sorry but can I ask which columns are you using in your table/matrix?&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 18:47:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809091#M88790</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-30T18:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809128#M88798</link>
      <description>&lt;P&gt;My table has these columns so far:&lt;/P&gt;&lt;P&gt;1. Sales[ProductID]&lt;BR /&gt;2. Product'ProductName]&lt;/P&gt;&lt;P&gt;3. Total amount $ made during promotion for respective product (measure)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Product table is joined to Sales through ProductID, just like Promotion.&lt;BR /&gt;&lt;BR /&gt;I'd like for column 4 and 5 to represent average daily amount $ made for each product, during promotion and outside the promotion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new tp power bi so apologies for any ambiguity!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 19:03:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809128#M88798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-30T19:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809699#M88894</link>
      <description>&lt;P&gt;Good Moring&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Sorry for the late response, it was too late last night. Let's start trying the following&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;None Prpotion Sales =
VAR _StartDate =
    CALCULATE (
        MAX ( DimPromotion[StartDate] ),
        CROSSFILTER ( Sales[Index], DimPromotion[Index], BOTH )
    )
VAR _EndDate =
    CALCULATE (
        MAX ( DimPromotion[EndDate] ),
        CROSSFILTER ( Sales[Index], DimPromotion[Index], BOTH )
    )
RETURN
    CALCULATE (
        SUM ( Sales[Sales_Value] ),
        DimDate[Date] &amp;lt; _StartDate
            &amp;amp;&amp;amp; DimDate[Date] &amp;gt; _EndDate
    )&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 01 Oct 2022 03:08:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809699#M88894</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-10-01T03:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809827#M88915</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for your reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gave blank values unfortunately. Do you know what could possibly cause this?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 07:18:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809827#M88915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-01T07:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809844#M88917</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Would you like to connect perhaps via teams to zoom?&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 07:43:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2809844#M88917</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-10-01T07:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Average daily sales with filter out dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2815904#M89288</link>
      <description>&lt;P&gt;Apologies for the long delay in replying.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for offering your help but in the end I used a bridge table to get around this issue and now I can get it to work.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 06:28:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-daily-sales-with-filter-out-dates/m-p/2815904#M89288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-04T06:28:25Z</dc:date>
    </item>
  </channel>
</rss>

