<?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 Data Between daterange in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1077558#M15142</link>
    <description>&lt;P&gt;Thanks for the help on this one. It was driving me a bit mad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I check the process you did to create the Date Table? I want to recycle your code e.g.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Date = CALENDAR(EOMONTH(MIN(Sales[Date]). -1) +1, EOMONTH(MAX(Sales[Date]), 0))&lt;/LI-CODE&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 May 2020 00:28:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-05-07T00:28:23Z</dc:date>
    <item>
      <title>Filter Data Between daterange</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1075217#M15069</link>
      <description>&lt;P&gt;I attempted to follow this &lt;A href="https://community.powerbi.com/t5/Desktop/Filter-Measure-Between-Dates/m-p/918931#M440369" target="_self"&gt;thread&lt;/A&gt; on this channel but I think my issue is easier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below table (dates) that shows the beginning and ending of a month&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;StartDate&lt;/TD&gt;&lt;TD&gt;EndDate&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/10/2020&lt;/TD&gt;&lt;TD&gt;31/10/2020&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;01/11/2020&lt;/TD&gt;&lt;TD&gt;30/11/2020&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My other table (sales) has a date between these ranges&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;TD&gt;Store&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;08/10/2020&lt;/TD&gt;&lt;TD&gt;88&lt;/TD&gt;&lt;TD&gt;StoreA&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11/10/2020&lt;/TD&gt;&lt;TD&gt;92&lt;/TD&gt;&lt;TD&gt;StoreB&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;05/11/2020&lt;/TD&gt;&lt;TD&gt;110&lt;/TD&gt;&lt;TD&gt;StoreA&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like a date slicer that returns the sum based on filtered data in table (Sales)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q1. Would it best to use a SUMX aggregrator?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q2. How could I create a relationship between these two tables based only on the daterange?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a little stuck and would appreciate the help.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 08:26:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1075217#M15069</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-06T08:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data Between daterange</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1076810#M15113</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't need a table with start and end. You can create just a date table and relate them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use a slicer, you are gonna have the start/end dates to filter. Also, you can create more columns on your date table like month/year and use it on slicers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Check this file:&amp;nbsp;&lt;A title="PBIX" href="https://drive.google.com/file/d/1F939i_qFri5O7C6m96P7MhsfPFkBUiM5/view?usp=sharing" target="_blank" rel="noopener"&gt;Download PBIX&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Ricardo&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 17:37:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1076810#M15113</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-05-06T17:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data Between daterange</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1077558#M15142</link>
      <description>&lt;P&gt;Thanks for the help on this one. It was driving me a bit mad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I check the process you did to create the Date Table? I want to recycle your code e.g.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Date = CALENDAR(EOMONTH(MIN(Sales[Date]). -1) +1, EOMONTH(MAX(Sales[Date]), 0))&lt;/LI-CODE&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 00:28:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1077558#M15142</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-07T00:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data Between daterange</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1077757#M15154</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function CALENDAR receives 2 parameters (start and end dates), the code just get the min and max of your sales date and the function EOMONTH returns the end of the month with the number of months you need.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;EOMONTH(MIN(Sales[Date]). -1) +1&lt;/PRE&gt;&lt;P&gt;This one goes to the end of the min month of your sales tables, but the parameter is -1, so it will go back 1 month. Also it's adding 1 day to this date.&lt;/P&gt;&lt;P&gt;Min Date =&amp;gt; 2020-01-01&lt;/P&gt;&lt;P&gt;EOMONTH =&amp;gt; 2020-01-31 // This is the same as EOMONTH(MIN(Sales[Date]); -0))&lt;/P&gt;&lt;P&gt;EOMONTH with -1 =&amp;gt; 2019-12-31&lt;/P&gt;&lt;P&gt;(EOMONTH with -1) + 1 =&amp;gt;&amp;nbsp;&amp;nbsp;2019-12-31 + 1 =&amp;gt; 2020-01-01&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank" rel="noopener"&gt;https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank" rel="noopener"&gt;https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/calendar-function-dax" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/dax/calendar-function-dax&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also check this link for time-intel functions, you can enrich you report with them:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/time-intelligence-functions-dax" target="_blank" rel="noopener"&gt;https://docs.microsoft.com/en-us/dax/time-intelligence-functions-dax&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 02:04:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1077757#M15154</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-05-07T02:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data Between daterange</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1079087#M15180</link>
      <description>&lt;P&gt;Thanks Ricardo.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the best way to create the data table? Do I just press the entre data option in the Home&amp;gt;Data icon?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share the steps you did to create this data table. This was what I was trying to ask. Sorry I was not clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for those articles I will ingest them &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 11:52:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1079087#M15180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-07T11:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data Between daterange</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1079111#M15183</link>
      <description>&lt;P&gt;Oh I think you shared that article&amp;nbsp;&lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share that code snippet?&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:03:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1079111#M15183</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-05-07T12:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Filter Data Between daterange</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1079132#M15184</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is just an example, there are many ways to create the date table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 May 2020 12:14:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-Data-Between-daterange/m-p/1079132#M15184</guid>
      <dc:creator>camargos88</dc:creator>
      <dc:date>2020-05-07T12:14:47Z</dc:date>
    </item>
  </channel>
</rss>

