<?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 Filter context doesnt apply with custom date slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-doesnt-apply-with-custom-date-slicer/m-p/3222697#M117872</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have implemented a new Date Picker following&amp;nbsp;&lt;A href="https://www.linkedin.com/pulse/custom-range-date-slicer-power-bi-dynamic-defaults-more-a%C5%9F%C4%B1ro%C4%9Flu/" target="_self"&gt;this quick tutorial&lt;/A&gt;&amp;nbsp;in order to extend the possibility of filtering my data. However, I am struggling with calculating measures for the previous period selected in my Date Picker.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, here is how my model is built:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the measure I want to calculate in a modified filter context:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is a quick example of how my Dateslicer selection is built:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I then put the "Period" column in a slicer in order to select the "Last calendar week" option and then filter the Datedim table in the corresponding manner and to replace the classic between date slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, since I have implemented this configuration, I am not able to calculate the previous_period_measure with this original formula (&lt;EM&gt;startOfPrevPeriod&lt;/EM&gt; and &lt;EM&gt;endOfPrevPeriod&lt;/EM&gt; being out of the data range filtered with the slicer) :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously, without the DateSlicerSelection, the&amp;nbsp;&lt;EM&gt;&lt;SPAN&gt;DateDim&lt;/SPAN&gt;&lt;SPAN&gt;[FullDateAlternateKey] &lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN&gt;was in a between date slicer and everything was working fine. Despite the fact that I have absolutely no idea of how to fix it, I have made few observations:&lt;BR /&gt;&lt;BR /&gt;I am able to get the very first Date of my DimDate table even with it is filtered with he following formula :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Modifying my measure calculation with the following formula, I got the result for the current period selection and not the previous one:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please, does someone has an idea on how to fix this problem ?&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Melvin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 05 May 2023 19:52:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-05T19:52:24Z</dc:date>
    <item>
      <title>Filter context doesnt apply with custom date slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-doesnt-apply-with-custom-date-slicer/m-p/3222697#M117872</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have implemented a new Date Picker following&amp;nbsp;&lt;A href="https://www.linkedin.com/pulse/custom-range-date-slicer-power-bi-dynamic-defaults-more-a%C5%9F%C4%B1ro%C4%9Flu/" target="_self"&gt;this quick tutorial&lt;/A&gt;&amp;nbsp;in order to extend the possibility of filtering my data. However, I am struggling with calculating measures for the previous period selected in my Date Picker.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, here is how my model is built:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the measure I want to calculate in a modified filter context:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is a quick example of how my Dateslicer selection is built:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I then put the "Period" column in a slicer in order to select the "Last calendar week" option and then filter the Datedim table in the corresponding manner and to replace the classic between date slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, since I have implemented this configuration, I am not able to calculate the previous_period_measure with this original formula (&lt;EM&gt;startOfPrevPeriod&lt;/EM&gt; and &lt;EM&gt;endOfPrevPeriod&lt;/EM&gt; being out of the data range filtered with the slicer) :&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously, without the DateSlicerSelection, the&amp;nbsp;&lt;EM&gt;&lt;SPAN&gt;DateDim&lt;/SPAN&gt;&lt;SPAN&gt;[FullDateAlternateKey] &lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN&gt;was in a between date slicer and everything was working fine. Despite the fact that I have absolutely no idea of how to fix it, I have made few observations:&lt;BR /&gt;&lt;BR /&gt;I am able to get the very first Date of my DimDate table even with it is filtered with he following formula :&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Modifying my measure calculation with the following formula, I got the result for the current period selection and not the previous one:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Please, does someone has an idea on how to fix this problem ?&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Melvin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 05 May 2023 19:52:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-context-doesnt-apply-with-custom-date-slicer/m-p/3222697#M117872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-05T19:52:24Z</dc:date>
    </item>
  </channel>
</rss>

