<?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: DAX Measure that accounts for previous dates data and not future dates data based on current date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2665407#M79204</link>
    <description>&lt;P&gt;Hi Vapid,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second proposed solution did in fact work for my needs. Thank you for your help!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 15:08:58 GMT</pubDate>
    <dc:creator>npombo</dc:creator>
    <dc:date>2022-07-27T15:08:58Z</dc:date>
    <item>
      <title>DAX Measure that accounts for previous dates data and not future dates data based on current date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2654424#M78371</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a financial report that is connected to an excel document full of referenced data. In Power BI desktop, I am hoping to display the average COGS per day (Cost of Goods Sold) in the form of a PBIX card on a Year to Date scale. Chronologically speaking, the data is organized by week (Mon-Sun). I have references set up in excel to capture future data as it occurs for this year. Below is an example mockup to better visualize my data/request:&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;The issue I am having here is that the average COGS/day is taking into account future weeks where the data is evidently zero. For instance, today's date is 7/21, so all future weeks (weeks of 7/25, 8/1, etc.) are being included in this average and are therefore skewing this metric.&amp;nbsp;I am hoping to write a measure that only accounts for weeks prior to the current date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help/tips on my ask would be very appreciated! Thank you in advance.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 00:16:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2654424#M78371</guid>
      <dc:creator>npombo</dc:creator>
      <dc:date>2022-07-22T00:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure that accounts for previous dates data and not future dates data based on current date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2654476#M78379</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="302503" data-lia-user-login="npombo" class="lia-mention lia-mention-user"&gt;npombo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interesting that you mention this.&lt;/P&gt;&lt;P&gt;I was seeing the same behavior on a separate problem using TOTALYTD earlier today.&amp;nbsp; TOTALYTD should stop at today's date, but it was giving me future dates, just like you said.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a workaround, using the simple DATE &amp;amp; TODAY functions resolved the problem for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try something like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Hope this is helpful to you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 01:20:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2654476#M78379</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2022-07-22T01:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure that accounts for previous dates data and not future dates data based on current date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2654479#M78380</link>
      <description>&lt;P&gt;we can average all weeks which have number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calculate(average([&lt;SPAN&gt;COGS per day]),[COGS per day]&amp;gt;0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;we also can&amp;nbsp;average all numbers before today.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;calculate(average([COGS per day]),[week]&amp;lt;today())&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 01:21:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2654479#M78380</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-07-22T01:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure that accounts for previous dates data and not future dates data based on current date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2660249#M78843</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="302503" data-lia-user-login="npombo" class="lia-mention lia-mention-user"&gt;npombo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you are doing well.&amp;nbsp; Was the info provided helpful to you?&amp;nbsp; Were you able to resolve the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 21:13:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2660249#M78843</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2022-07-25T21:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure that accounts for previous dates data and not future dates data based on current date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2660316#M78853</link>
      <description>&lt;P&gt;Hi Nathan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apologies for the late response. I attempted the workaround proposed by user vapid128 first, and it appears to have worked. I will be able to know for certain after tracking the potential change in the metric tomorrow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate your help/follow up and will update the forum post accordingly once I can confirm or deny this potential solution.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 22:28:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2660316#M78853</guid>
      <dc:creator>npombo</dc:creator>
      <dc:date>2022-07-25T22:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure that accounts for previous dates data and not future dates data based on current date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2660333#M78856</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="302503" data-lia-user-login="npombo" class="lia-mention lia-mention-user"&gt;npombo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No need to apologize!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glad it sounds like the solution from&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="359999" data-lia-user-login="vapid128" class="lia-mention lia-mention-user"&gt;vapid128&lt;/a&gt;&amp;nbsp;will work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 22:56:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2660333#M78856</guid>
      <dc:creator>WinterMist</dc:creator>
      <dc:date>2022-07-25T22:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measure that accounts for previous dates data and not future dates data based on current date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2665407#M79204</link>
      <description>&lt;P&gt;Hi Vapid,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second proposed solution did in fact work for my needs. Thank you for your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 15:08:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measure-that-accounts-for-previous-dates-data-and-not-future/m-p/2665407#M79204</guid>
      <dc:creator>npombo</dc:creator>
      <dc:date>2022-07-27T15:08:58Z</dc:date>
    </item>
  </channel>
</rss>

