<?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 Issues with Overlapping Date Ranges in Slicer Not Displaying Correctly in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issues-with-Overlapping-Date-Ranges-in-Slicer-Not-Displaying/m-p/4383582#M174001</link>
    <description>&lt;P&gt;Hello Power BI Community,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am working on a report in Power BI where I need to use a slicer to filter data based on overlapping time frames: "Last 12 Months," "Last 24 Months," and "Last 36 Months." I want each time frame to include all the data up to the present, with each range overlapping the next (e.g., "Last 24 Months" includes "Last 12 Months").&lt;/P&gt;&lt;H3&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Setup Details&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;I created a separate DateTable specifically for managing date-related calculations. Here’s how I structured this table:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Creation of DateTable&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I generated the DateTable using the DAX function CALENDAR, to cover a range from the earliest date needed for my reports up to the current date.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DateTable = CALENDAR(MIN('MainDataTable'[Date]), TODAY())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- This ensures the DateTable is always up to date and covers all possible dates in my data model.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DAX Formula for Time Frames&lt;/STRONG&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I added the following DAX formula to categorize each date into the specified overlapping time frames:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Time Frame = 
SWITCH(
    TRUE(),
    DateTable[Date] &amp;gt; EDATE(TODAY(), -12), "Last 12 Months",
    DateTable[Date] &amp;gt; EDATE(TODAY(), -24), "Last 24 Months",
    DateTable[Date] &amp;gt; EDATE(TODAY(), -36), "Last 36 Months",
    "Older"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue&lt;/STRONG&gt;: &lt;FONT color="#000080"&gt;When I use this formula for a slicer in my report, it does not behave as expected. The slicer treats each time frame independently rather than recognizing the overlap between them.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;H3&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Example of the Issue:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Current Date&lt;/STRONG&gt;: January 28, 2025&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Expected Behavior&lt;/STRONG&gt;: Selecting "Last 24 Months" should show records from January 28, 2023, to January 28, 2025, inclusive of the "Last 12 Months."&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Actual Behavior&lt;/STRONG&gt;: Records from January 28, 2024, to January 28, 2025, appear to be excluded when "Last 24 Months" is selected, indicating a possible filtering issue.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My questions are&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;Is there an error in how I've structured the DAX formula that might be causing this issue?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;How can I modify the formula or the slicer settings so that the slicer correctly accounts for overlapping periods?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any guidance or suggestions would be greatly appreciated as this functionality is crucial for the analytical capabilities of my report.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2025 06:18:24 GMT</pubDate>
    <dc:creator>user_guddu10</dc:creator>
    <dc:date>2025-01-28T06:18:24Z</dc:date>
    <item>
      <title>Issues with Overlapping Date Ranges in Slicer Not Displaying Correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issues-with-Overlapping-Date-Ranges-in-Slicer-Not-Displaying/m-p/4383582#M174001</link>
      <description>&lt;P&gt;Hello Power BI Community,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am working on a report in Power BI where I need to use a slicer to filter data based on overlapping time frames: "Last 12 Months," "Last 24 Months," and "Last 36 Months." I want each time frame to include all the data up to the present, with each range overlapping the next (e.g., "Last 24 Months" includes "Last 12 Months").&lt;/P&gt;&lt;H3&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Setup Details&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;P&gt;I created a separate DateTable specifically for managing date-related calculations. Here’s how I structured this table:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Creation of DateTable&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I generated the DateTable using the DAX function CALENDAR, to cover a range from the earliest date needed for my reports up to the current date.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DateTable = CALENDAR(MIN('MainDataTable'[Date]), TODAY())&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;- This ensures the DateTable is always up to date and covers all possible dates in my data model.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DAX Formula for Time Frames&lt;/STRONG&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I added the following DAX formula to categorize each date into the specified overlapping time frames:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Time Frame = 
SWITCH(
    TRUE(),
    DateTable[Date] &amp;gt; EDATE(TODAY(), -12), "Last 12 Months",
    DateTable[Date] &amp;gt; EDATE(TODAY(), -24), "Last 24 Months",
    DateTable[Date] &amp;gt; EDATE(TODAY(), -36), "Last 36 Months",
    "Older"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue&lt;/STRONG&gt;: &lt;FONT color="#000080"&gt;When I use this formula for a slicer in my report, it does not behave as expected. The slicer treats each time frame independently rather than recognizing the overlap between them.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;H3&gt;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;Example of the Issue:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Current Date&lt;/STRONG&gt;: January 28, 2025&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Expected Behavior&lt;/STRONG&gt;: Selecting "Last 24 Months" should show records from January 28, 2023, to January 28, 2025, inclusive of the "Last 12 Months."&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Actual Behavior&lt;/STRONG&gt;: Records from January 28, 2024, to January 28, 2025, appear to be excluded when "Last 24 Months" is selected, indicating a possible filtering issue.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My questions are&lt;/STRONG&gt;:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;Is there an error in how I've structured the DAX formula that might be causing this issue?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;&lt;FONT color="#008000"&gt;How can I modify the formula or the slicer settings so that the slicer correctly accounts for overlapping periods?&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Any guidance or suggestions would be greatly appreciated as this functionality is crucial for the analytical capabilities of my report.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 06:18:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issues-with-Overlapping-Date-Ranges-in-Slicer-Not-Displaying/m-p/4383582#M174001</guid>
      <dc:creator>user_guddu10</dc:creator>
      <dc:date>2025-01-28T06:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Overlapping Date Ranges in Slicer Not Displaying Correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issues-with-Overlapping-Date-Ranges-in-Slicer-Not-Displaying/m-p/4383631#M174003</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="910248" data-lia-user-login="user_guddu10" class="lia-mention lia-mention-user"&gt;user_guddu10&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Based on your requirment, it is not possible to include a single date to be in two different periods ( example:&amp;nbsp; 12M and 24M), you will have to have separate set for each period and stack them, please follow this video, it will help you:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=fKygF7VEJnQ" target="_blank"&gt;Custom Date Period Selections in Power BI - YouTube&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 06:50:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issues-with-Overlapping-Date-Ranges-in-Slicer-Not-Displaying/m-p/4383631#M174003</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2025-01-28T06:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with Overlapping Date Ranges in Slicer Not Displaying Correctly</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issues-with-Overlapping-Date-Ranges-in-Slicer-Not-Displaying/m-p/4385329#M174071</link>
      <description>&lt;P&gt;Thanks a lot! This solved my issue!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2025 01:14:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Issues-with-Overlapping-Date-Ranges-in-Slicer-Not-Displaying/m-p/4385329#M174071</guid>
      <dc:creator>user_guddu10</dc:creator>
      <dc:date>2025-01-29T01:14:39Z</dc:date>
    </item>
  </channel>
</rss>

