<?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 based on dynamic date range from two dropdown slicers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-based-on-dynamic-date-range-from-two-dropdown-slicers/m-p/844688#M6489</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;My recommendation will be to have two calendar tables which do not have an active relationship to your start schema&lt;/P&gt;&lt;P&gt;Calendar1&lt;/P&gt;&lt;P&gt;Calendar2&lt;/P&gt;&lt;P&gt;Add a Slicer using Calendar1&lt;/P&gt;&lt;P&gt;Add another Slicer using Calendar2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the calculated measure&lt;/P&gt;&lt;P&gt;calculated measure =&lt;/P&gt;&lt;P&gt;var _StartDate = max(Calendar1[Date])&lt;/P&gt;&lt;P&gt;var _EndDate = max(calendar2[Date])&lt;/P&gt;&lt;P&gt;return calculate(sum(dax expression),&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="hljs-built_in"&gt;DATESBETWEEN&lt;/SPAN&gt;&lt;SPAN&gt;(Calendar[DateKey], _StartDate&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class="hljs-built_in"&gt;_EndDate &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please let me know if this help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tomas&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2019 09:30:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-11-13T09:30:35Z</dc:date>
    <item>
      <title>Measure based on dynamic date range from two dropdown slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-based-on-dynamic-date-range-from-two-dropdown-slicers/m-p/844552#M6484</link>
      <description>&lt;P&gt;Greetings DAX masters,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue which I don't know how to solve. I need to create a measure which will calculate sum of volume between two dates. But these dates I need to be dynamic based on two dropdown slicers: start date, end date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible? Could you please help with some general syntax to solve this?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 07:55:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-based-on-dynamic-date-range-from-two-dropdown-slicers/m-p/844552#M6484</guid>
      <dc:creator>soldous</dc:creator>
      <dc:date>2019-11-13T07:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Measure based on dynamic date range from two dropdown slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-based-on-dynamic-date-range-from-two-dropdown-slicers/m-p/844688#M6489</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;My recommendation will be to have two calendar tables which do not have an active relationship to your start schema&lt;/P&gt;&lt;P&gt;Calendar1&lt;/P&gt;&lt;P&gt;Calendar2&lt;/P&gt;&lt;P&gt;Add a Slicer using Calendar1&lt;/P&gt;&lt;P&gt;Add another Slicer using Calendar2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the calculated measure&lt;/P&gt;&lt;P&gt;calculated measure =&lt;/P&gt;&lt;P&gt;var _StartDate = max(Calendar1[Date])&lt;/P&gt;&lt;P&gt;var _EndDate = max(calendar2[Date])&lt;/P&gt;&lt;P&gt;return calculate(sum(dax expression),&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="hljs-built_in"&gt;DATESBETWEEN&lt;/SPAN&gt;&lt;SPAN&gt;(Calendar[DateKey], _StartDate&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class="hljs-built_in"&gt;_EndDate &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please let me know if this help&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Tomas&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 09:30:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Measure-based-on-dynamic-date-range-from-two-dropdown-slicers/m-p/844688#M6489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-13T09:30:35Z</dc:date>
    </item>
  </channel>
</rss>

