<?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: Use week-slicer to filter visual on the according month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4337816#M172241</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="903116" data-lia-user-login="IvBa" class="lia-mention lia-mention-user"&gt;IvBa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to mark_endicott for the great reply.&lt;/P&gt;
&lt;P&gt;Please allow me to add another solution:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;Create a slicer with Calendarweek column&lt;/P&gt;
&lt;P&gt;2. Create a measure with the following DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FilteredValues = 
VAR LastDayOfWeek = MAX('Table'[Date])
VAR SelectedMonth = MONTH(LastDayOfWeek)
RETURN
CALCULATE(
    SUM('Table'[Amount]),
    FILTER(
        ALL('Table'),
        MONTH('Table'[Date]) = SelectedMonth
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jarvis Tang&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Dec 2024 02:07:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-12-20T02:07:52Z</dc:date>
    <item>
      <title>Use week-slicer to filter visual on the according month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4335300#M172140</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We want to create a report and faced a problem, that we will need to solve also for future reports.&lt;/P&gt;&lt;P&gt;In our current implementation, we use a slicer on one column of our date-table that filters the Calendarweek (Format YYYY.WW).&lt;/P&gt;&lt;P&gt;The values of a table-visual are filtered using this selected value and that works fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now we have another visual, that we want to filter by the month that corresponds to the last day of our week. I.E. if we consider calendar week 48 in 2024 we get the 01.12.2024 as the last day of the week. So we want to filter our second visual to use all dates in december 2024.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently we are having problems creating a dynamic filter criterion that filters our second visual based on the corresponding month of the selection of our week slicer.&lt;/P&gt;&lt;P&gt;Does anyone have some suggestions how we can implement this in PowerBI?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 14:53:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4335300#M172140</guid>
      <dc:creator>IvBa</dc:creator>
      <dc:date>2024-12-18T14:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use week-slicer to filter visual on the according month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4335443#M172142</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="903116" data-lia-user-login="IvBa" class="lia-mention lia-mention-user"&gt;IvBa&lt;/a&gt;&amp;nbsp;- You can use variables ( VAR ) to define a Range Start and End for your month, then use these in combination with&amp;nbsp;REMOVEFILTERS( DateTable ) to change the filter context for the measures in your 2nd visual. Your measures will probably look something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR _selected_week = MAX( 'Datetable'[week ending] )
VAR _range_start = EOMONTH( _selected_week, -1 ) +1
VAR _range_end = EOMONTH( _selected_week, 0 ) 

RETURN
CALCULATE( [Measure], REMOVEFILTERS( 'Datetable' ), 'Datetable'[Date] &amp;gt;= _range_start &amp;amp;&amp;amp; 'Datetable'[Date] &amp;lt;= _range_end )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this sample DAX helps you, please mark it as the solution to help others with the same challenge.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 16:46:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4335443#M172142</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-12-18T16:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use week-slicer to filter visual on the according month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4337816#M172241</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="903116" data-lia-user-login="IvBa" class="lia-mention lia-mention-user"&gt;IvBa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to mark_endicott for the great reply.&lt;/P&gt;
&lt;P&gt;Please allow me to add another solution:&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp;Create a slicer with Calendarweek column&lt;/P&gt;
&lt;P&gt;2. Create a measure with the following DAX:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;FilteredValues = 
VAR LastDayOfWeek = MAX('Table'[Date])
VAR SelectedMonth = MONTH(LastDayOfWeek)
RETURN
CALCULATE(
    SUM('Table'[Amount]),
    FILTER(
        ALL('Table'),
        MONTH('Table'[Date]) = SelectedMonth
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample data:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Jarvis Tang&lt;BR /&gt;If this post &lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider &lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 02:07:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4337816#M172241</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-20T02:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use week-slicer to filter visual on the according month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4340726#M172364</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="903116" data-lia-user-login="IvBa" class="lia-mention lia-mention-user"&gt;IvBa&lt;/a&gt;&amp;nbsp;- did we resolve your issue? If we did, please select the appropriate solution, it helps with visibility for others and for SuperUsers to keep their status! Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 10:52:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-week-slicer-to-filter-visual-on-the-according-month/m-p/4340726#M172364</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-12-23T10:52:57Z</dc:date>
    </item>
  </channel>
</rss>

