<?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: Measure includes all date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3095392#M108585</link>
    <description>&lt;P&gt;So, the only solution I found to fix it, is to create a new table containing all dates values.&lt;/P&gt;&lt;P&gt;Then I use it in my chart. this solve the issue, but I am still persuaded it can be solved my reworking the measure.&lt;BR /&gt;Hopefully someone will figure this out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;OrderEntry Calendar = &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OrderEntry&lt;/SPAN&gt;&lt;SPAN&gt;[Date2]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 23 Feb 2023 12:58:31 GMT</pubDate>
    <dc:creator>MagikJukas</dc:creator>
    <dc:date>2023-02-23T12:58:31Z</dc:date>
    <item>
      <title>Measure includes all date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3090274#M108224</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am trying to build a rolling 28 days measure:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt; ( OrderEntry[Total] ),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&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;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(OrderEntry),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (OrderEntry[Created on])&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(OrderEntry[Created on])-&lt;/SPAN&gt;&lt;SPAN&gt;28&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; OrderEntry[Created on]&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(OrderEntry[Created on])))&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the problem with this measure is that, as I am excluding years earlier than 2019, the measure is not computing 2018 numbers for the first days of 2019.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I replace&amp;nbsp;&lt;SPAN&gt;ALLSELECTED(OrderEntry) with&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(OrderEntry[Created on]) the measure does not compute anymore the last 28 days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;any advice?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 21 Feb 2023 12:11:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3090274#M108224</guid>
      <dc:creator>MagikJukas</dc:creator>
      <dc:date>2023-02-21T12:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: Measure includes all date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3090597#M108249</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Rolling 28 days =
VAR MaxDate =
    MAX ( OrderEntry[Created on] )
RETURN
    CALCULATE (
        SUM ( OrderEntry[Total] ),
        ALLSELECTED ( OrderEntry ),
        REMOVEFILTERS ( OrderEntry[Created on] ),
        OrderEntry[Created on] &amp;gt; MaxDate - 28
            &amp;amp;&amp;amp; OrderEntry[Created on] &amp;lt;= MaxDate
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 21 Feb 2023 14:35:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3090597#M108249</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-02-21T14:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Measure includes all date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3090620#M108253</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;, that works, until I start using a slicer.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;see what happen when I select two elemets in my slicer "Category": the data shows heavy pitfalls.&lt;BR /&gt;this because for few given dates, the data is empty for one of the category selected.&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;with the other formula this does not happen, however it give wrong data for the first days of the starting year.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 14:47:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3090620#M108253</guid>
      <dc:creator>MagikJukas</dc:creator>
      <dc:date>2023-02-21T14:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Measure includes all date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3090727#M108260</link>
      <description>&lt;P&gt;can you share some sample data which shows the problem ?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 15:28:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3090727#M108260</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-02-21T15:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Measure includes all date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3091223#M108302</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;here you have it:&amp;nbsp;&lt;A href="https://drive.google.com/file/d/16YS1Ky88TSFwG8RNNNebial71zL0cw2I/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/16YS1Ky88TSFwG8RNNNebial71zL0cw2I/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please be aware of:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I filtered out 2018&lt;/LI&gt;&lt;LI&gt;I selected categories 12000 amd 12100&lt;/LI&gt;&lt;LI&gt;first chart is your formula: you can see the first days are way too low, because they do not read 2018 data. this is not good. (as soon you add 2018, the chart looks correct).&lt;/LI&gt;&lt;LI&gt;second chart is my measure: you can see Jan 26 there is a drop. this does not make sense.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ideal solution should be the second chart without those drops.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 20:18:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3091223#M108302</guid>
      <dc:creator>MagikJukas</dc:creator>
      <dc:date>2023-02-21T20:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Measure includes all date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3095392#M108585</link>
      <description>&lt;P&gt;So, the only solution I found to fix it, is to create a new table containing all dates values.&lt;/P&gt;&lt;P&gt;Then I use it in my chart. this solve the issue, but I am still persuaded it can be solved my reworking the measure.&lt;BR /&gt;Hopefully someone will figure this out.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;OrderEntry Calendar = &lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;OrderEntry&lt;/SPAN&gt;&lt;SPAN&gt;[Date2]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 Feb 2023 12:58:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-includes-all-date/m-p/3095392#M108585</guid>
      <dc:creator>MagikJukas</dc:creator>
      <dc:date>2023-02-23T12:58:31Z</dc:date>
    </item>
  </channel>
</rss>

