<?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: Dynamic Date Slicer Depending on the current day in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195736#M116013</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="547026" data-lia-user-login="ozgeozkaya" class="lia-mention lia-mention-user"&gt;ozgeozkaya&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attached sample file amended as required.&lt;/P&gt;
&lt;P&gt;Use the following measure in the three visuals&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Sum of Transaction Period = 
SUMX ( 
    FILTER (
        VALUES ( 'Date'[Date] ),
        VAR CurrentDay = DAY ( TODAY ( ) )
        VAR MonthOffset = IF ( CurrentDay &amp;lt; 25, - 1 )
        VAR StartEOMonth = EOMONTH ( TODAY ( ), MonthOffset - 1 )
        VAR EndEOMonth = EOMONTH ( TODAY ( ), MonthOffset )
        VAR StartMonth = MONTH ( StartEOMonth )
        VAR EndMonth = MONTH ( EndEOMonth )
        VAR StartYear = YEAR ( StartEOMonth )
        VAR EndYear = YEAR ( EndEOMonth )
        VAR StartDate = DATE ( StartYear, StartMonth, 25 )
        VAR EndDate = DATE ( EndYear, EndMonth, 24 )
        RETURN
            'Date'[Date] &amp;gt;= StartDate
                    &amp;amp;&amp;amp; 'Date'[Date] &amp;lt;= EndDate
    ),
    CALCULATE ( SUM ( Overtime[Transaction Period] ) )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 19 Apr 2023 12:14:20 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-04-19T12:14:20Z</dc:date>
    <item>
      <title>Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3191352#M115745</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I have a date slicer for selecting From and To dates from the Calendar Table. The data shows accordingly.&lt;/P&gt;&lt;P&gt;I want to set the From and To dates on the slicer dynamically according to the current day. From date should start from 25th of the month and To date should end with 24th of the following month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Criteria:&lt;/STRONG&gt; If the current day equals or after the 25th of the &lt;STRONG&gt;current month&lt;/STRONG&gt; then From date should be set to 25th of that month and To date to be set to 24th of the following month.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Examples:&lt;/STRONG&gt;&lt;BR /&gt;Let's say today is 17th of April. Then the From date will be 25.02.2023 and To date will be 24.03.2023&lt;/P&gt;&lt;P&gt;Let's say today is 25th of April. Then the From date will be 25.03.2023 and To date will be 24.04.2023&lt;/P&gt;&lt;P&gt;Let's say today is 1st of May.&amp;nbsp;Then the From date will be 25.03.2023 and To date will be 24.04.2023&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope any some can help me with how to set the From and To dates on the slider dynamically.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 11:03:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3191352#M115745</guid>
      <dc:creator>ozgeozkaya</dc:creator>
      <dc:date>2023-04-17T11:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3192696#M115825</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="547026" data-lia-user-login="ozgeozkaya" class="lia-mention lia-mention-user"&gt;ozgeozkaya&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attached sample fie. Create the following filter measure, place in the filter pane of the slicer, select "is not blank" then apply the filter.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;DateFilter = 
VAR CurrentDay = DAY ( TODAY ( ) )
VAR MonthOffset = IF ( CurrentDay &amp;lt; 25, - 1 )
VAR StartEOMonth = EOMONTH ( TODAY ( ), MonthOffset - 1 )
VAR EndEOMonth = EOMONTH ( TODAY ( ), MonthOffset )
VAR StartMonth = MONTH ( StartEOMonth )
VAR EndMonth = MONTH ( EndEOMonth )
VAR StartYear = YEAR ( StartEOMonth )
VAR EndYear = YEAR ( EndEOMonth )
VAR StartDate = DATE ( StartYear, StartMonth, 25 )
VAR EndDate = DATE ( EndYear, EndMonth, 24 )
VAR Result = 
    COUNTROWS ( 
        FILTER ( 
            'Date',
            'Date'[Date] &amp;gt;= StartDate
                &amp;amp;&amp;amp; 'Date'[Date] &amp;lt;= EndDate
        )
    ) 
RETURN 
    Result&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 09:48:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3192696#M115825</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-18T09:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3192717#M115827</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;Thank you for the prompt reply. It is working with one glitch. According to the today's date criteria, the slicer should be&amp;nbsp;&lt;SPAN&gt;25.02.2023 - 24.03.2023 not&amp;nbsp;25.03.2023 - 24.04.2023 because today is not yet 25th of the month. Once today is 25th or greater than 25th of the current month (April), then it will display as&amp;nbsp;25.03.2023 - 24.04.2023.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Examples:&lt;/STRONG&gt;&lt;BR /&gt;Let's say today is 18th of April. Then the From date will be 25.02.2023 and To date will be 24.03.2023&lt;/P&gt;&lt;P&gt;Let's say today is 25th of April. Then the From date will be 25.03.2023 and To date will be 24.04.2023&lt;/P&gt;&lt;P&gt;Let's say today is 1st of May.&amp;nbsp;Then the From date will be 25.03.2023 and To date will be 24.04.2023&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 05:30:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3192717#M115827</guid>
      <dc:creator>ozgeozkaya</dc:creator>
      <dc:date>2023-04-18T05:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3193281#M115854</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="547026" data-lia-user-login="ozgeozkaya" class="lia-mention lia-mention-user"&gt;ozgeozkaya&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Yes that was a mistake. Please refer to the updated solution in my original reply.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 09:48:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3193281#M115854</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-18T09:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3193509#M115866</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;,&amp;nbsp;the date slicer shows the correct dates now however for some reason it is not filtering the data. I am not sure if this is a bug or not but when you manually modify the slicer and choose the dates it filters the data accordingly but when you leave it as it is in the slicer filter you created, it is not filtering the data. It shows all available data in the table.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 11:42:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3193509#M115866</guid>
      <dc:creator>ozgeozkaya</dc:creator>
      <dc:date>2023-04-18T11:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3193786#M115880</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="547026" data-lia-user-login="ozgeozkaya" class="lia-mention lia-mention-user"&gt;ozgeozkaya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a visual level filter. You need to add it to every visual that needx to be filtered this way.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2023 13:25:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3193786#M115880</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-18T13:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3194999#M115972</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;Thank you for your reply. I &lt;A href="https://drive.google.com/file/d/17hvHYOmCw6ahMkLWsiVhN8LX8TlNf8WP/view?usp=share_link" target="_blank" rel="noopener"&gt;reattached&lt;/A&gt; your file. As you may see only the table visual which has date on it is filtered but the other visuals (Card and Column chart) are not able to filter the data correctly after the visual level filter is applied.&lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 05:57:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3194999#M115972</guid>
      <dc:creator>ozgeozkaya</dc:creator>
      <dc:date>2023-04-19T05:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195220#M115983</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="547026" data-lia-user-login="ozgeozkaya" class="lia-mention lia-mention-user"&gt;ozgeozkaya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes this method does not work with card visuals. The chart seems to be filtered but not to the desired values. I'll let you know if I was able to find a workaround for that. Very busy today so probably won't reply to you soon meanwhile please share the sample file with visuals via wetransfer or dropbox link.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 08:03:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195220#M115983</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-19T08:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195311#M115987</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp; here is the link:&amp;nbsp;&lt;A href="https://we.tl/t-UUvsmkhE1y" target="_self"&gt;https://we.tl/t-UUvsmkhE1y&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 08:41:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195311#M115987</guid>
      <dc:creator>ozgeozkaya</dc:creator>
      <dc:date>2023-04-19T08:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195736#M116013</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="547026" data-lia-user-login="ozgeozkaya" class="lia-mention lia-mention-user"&gt;ozgeozkaya&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attached sample file amended as required.&lt;/P&gt;
&lt;P&gt;Use the following measure in the three visuals&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Sum of Transaction Period = 
SUMX ( 
    FILTER (
        VALUES ( 'Date'[Date] ),
        VAR CurrentDay = DAY ( TODAY ( ) )
        VAR MonthOffset = IF ( CurrentDay &amp;lt; 25, - 1 )
        VAR StartEOMonth = EOMONTH ( TODAY ( ), MonthOffset - 1 )
        VAR EndEOMonth = EOMONTH ( TODAY ( ), MonthOffset )
        VAR StartMonth = MONTH ( StartEOMonth )
        VAR EndMonth = MONTH ( EndEOMonth )
        VAR StartYear = YEAR ( StartEOMonth )
        VAR EndYear = YEAR ( EndEOMonth )
        VAR StartDate = DATE ( StartYear, StartMonth, 25 )
        VAR EndDate = DATE ( EndYear, EndMonth, 24 )
        RETURN
            'Date'[Date] &amp;gt;= StartDate
                    &amp;amp;&amp;amp; 'Date'[Date] &amp;lt;= EndDate
    ),
    CALCULATE ( SUM ( Overtime[Transaction Period] ) )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 19 Apr 2023 12:14:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195736#M116013</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-19T12:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195818#M116018</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;wonderful solution. I will keep an eye on it on 25.04.2023 for final confirmation if you don't mind. Thank you again.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 12:49:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3195818#M116018</guid>
      <dc:creator>ozgeozkaya</dc:creator>
      <dc:date>2023-04-19T12:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Date Slicer Depending on the current day</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3204821#M116682</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="547026" data-lia-user-login="ozgeozkaya" class="lia-mention lia-mention-user"&gt;ozgeozkaya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes today is 25th&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 10:27:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dynamic-Date-Slicer-Depending-on-the-current-day/m-p/3204821#M116682</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-04-25T10:27:07Z</dc:date>
    </item>
  </channel>
</rss>

