<?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: Selection Date Slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-Date-Slicer/m-p/1956206#M42703</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="288105" data-lia-user-login="m_wex" class="lia-mention lia-mention-user"&gt;m_wex&lt;/a&gt; , As slicer might be coming from Date table having only one-directional join. Then Date slicer will not filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add measure in visual level filter for slicer and check for not blank value&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can force QTD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QTD QTY forced= &lt;BR /&gt;var _max = today()&lt;BR /&gt;return&lt;BR /&gt;if(max('Date'[Date])&amp;lt;=_max, calculate(Sum('order'[Qty]),DATESQTD('Date'[Date])), blank())&lt;BR /&gt;//or&lt;BR /&gt;//calculate(Sum('order'[Qty]),DATESQTD('Date'[Date]),filter('Date','Date'[Date]&amp;lt;=_max))&lt;BR /&gt;//calculate(TOTALQTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]&amp;lt;=_max))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LQTD QTY forced= &lt;BR /&gt;var _max = date(year(today()),month(today())-3,day(today()))&lt;BR /&gt;return&lt;BR /&gt;if(max('Date'[Date])&amp;lt;=_max, CALCULATE(Sum('order'[Qty]),DATESQTD(dateadd('Date'[Date],-1,year)),'Date'[Date]&amp;lt;=_max), blank())&lt;BR /&gt;//OR&lt;BR /&gt;//CALCULATE(Sum('order'[Qty]),DATESQTD(dateadd('Date'[Date],-1,Quarter)),'Date'[Date]&amp;lt;=_max)&lt;BR /&gt;//TOTALQTD(Sum('order'[Qty]),dateadd('Date'[Date],-1,Quarter),'Date'[Date]&amp;lt;=_max)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LQTD QTY forced= &lt;BR /&gt;var _max1 = maxx('order',[Order date]) // or //maxx(allselected('Date'), 'Date'[Date]) // or // Today()&lt;BR /&gt;var _max = date(year(_max1),month(_max1)-3,day(_max1))&lt;BR /&gt;return&lt;BR /&gt;if(max('Date'[Date])&amp;lt;=_max, CALCULATE(Sum('order'[Qty]),DATESQTD(dateadd('Date'[Date],-1,Quarter)),'Date'[Date]&amp;lt;=_max), blank())&lt;BR /&gt;//OR&lt;BR /&gt;//CALCULATE(Sum('order'[Qty]),DATESQTD(dateadd('Date'[Date],-1,Quarter)),'Date'[Date]&amp;lt;=_max)&lt;BR /&gt;//TOTALQTD(Sum('order'[Qty]),dateadd('Date'[Date],-1,Quarter),'Date'[Date]&amp;lt;=_max)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jul 2021 05:28:33 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2021-07-14T05:28:33Z</dc:date>
    <item>
      <title>Selection Date Slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-Date-Slicer/m-p/1955950#M42698</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Created a date slicer based on a date table linked to my invoiced sales table. The invoiced sales table only contains data through March 2021 but the slicer shows all quarters for 2021. Running into an issue with previous years' data. If Q1 is selected no issue, YTD and PYTD information is correct. But if 2021 is selected (which includes all 4 quarters) the previous years' sales data shows the whole pervious year versus only the sales through March 2021. Is there a workaround for the slicer so that it only allows selection though the last sales date in the involved sales table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Thanks M_Wex&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 02:42:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-Date-Slicer/m-p/1955950#M42698</guid>
      <dc:creator>m_wex</dc:creator>
      <dc:date>2021-07-14T02:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Date Slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-Date-Slicer/m-p/1956206#M42703</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="288105" data-lia-user-login="m_wex" class="lia-mention lia-mention-user"&gt;m_wex&lt;/a&gt; , As slicer might be coming from Date table having only one-directional join. Then Date slicer will not filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can add measure in visual level filter for slicer and check for not blank value&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can force QTD&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QTD QTY forced= &lt;BR /&gt;var _max = today()&lt;BR /&gt;return&lt;BR /&gt;if(max('Date'[Date])&amp;lt;=_max, calculate(Sum('order'[Qty]),DATESQTD('Date'[Date])), blank())&lt;BR /&gt;//or&lt;BR /&gt;//calculate(Sum('order'[Qty]),DATESQTD('Date'[Date]),filter('Date','Date'[Date]&amp;lt;=_max))&lt;BR /&gt;//calculate(TOTALQTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]&amp;lt;=_max))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LQTD QTY forced= &lt;BR /&gt;var _max = date(year(today()),month(today())-3,day(today()))&lt;BR /&gt;return&lt;BR /&gt;if(max('Date'[Date])&amp;lt;=_max, CALCULATE(Sum('order'[Qty]),DATESQTD(dateadd('Date'[Date],-1,year)),'Date'[Date]&amp;lt;=_max), blank())&lt;BR /&gt;//OR&lt;BR /&gt;//CALCULATE(Sum('order'[Qty]),DATESQTD(dateadd('Date'[Date],-1,Quarter)),'Date'[Date]&amp;lt;=_max)&lt;BR /&gt;//TOTALQTD(Sum('order'[Qty]),dateadd('Date'[Date],-1,Quarter),'Date'[Date]&amp;lt;=_max)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LQTD QTY forced= &lt;BR /&gt;var _max1 = maxx('order',[Order date]) // or //maxx(allselected('Date'), 'Date'[Date]) // or // Today()&lt;BR /&gt;var _max = date(year(_max1),month(_max1)-3,day(_max1))&lt;BR /&gt;return&lt;BR /&gt;if(max('Date'[Date])&amp;lt;=_max, CALCULATE(Sum('order'[Qty]),DATESQTD(dateadd('Date'[Date],-1,Quarter)),'Date'[Date]&amp;lt;=_max), blank())&lt;BR /&gt;//OR&lt;BR /&gt;//CALCULATE(Sum('order'[Qty]),DATESQTD(dateadd('Date'[Date],-1,Quarter)),'Date'[Date]&amp;lt;=_max)&lt;BR /&gt;//TOTALQTD(Sum('order'[Qty]),dateadd('Date'[Date],-1,Quarter),'Date'[Date]&amp;lt;=_max)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 05:28:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-Date-Slicer/m-p/1956206#M42703</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-07-14T05:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Selection Date Slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-Date-Slicer/m-p/1957505#M42746</link>
      <description>&lt;P&gt;Hi Amitchandak,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. Should I amend the relationship? From single cross filter direction to both?&lt;/P&gt;&lt;P&gt;With the Dax solutions. Is it possible to only show the last invoiced sales dare from the sales table for the date slicer? What I need ultiamtely is to map the last invoice date in the sales fact table to the slicer. That end date could be any date depending on how the fact table is updated. Right now, it is updated on a monthly basis but I am trying to get the report as close to real time as possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;M_Wex&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jul 2021 20:01:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Selection-Date-Slicer/m-p/1957505#M42746</guid>
      <dc:creator>m_wex</dc:creator>
      <dc:date>2021-07-14T20:01:41Z</dc:date>
    </item>
  </channel>
</rss>

