<?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: Filtering data table based on Today +14 days in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4131801#M164119</link>
    <description>&lt;P&gt;You probably want some Power Query calculations to return true/false or some sort of text label that makes sense to filter on (e.g. a column for "starting soon" true/false, or "late" true/false to use as filters). You can do custom columns in Power Query in the toolbar, the calculations aren't super difficult but they are pretty strict about syntax - so you can add days to a date field, then compare it to today's date, and return something for different cases in an if-statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for example, I have a report that uses task data that has a flag for overdue that looks like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if ([taskDue] &amp;lt;&amp;gt; null and [taskProgress] &amp;lt;&amp;gt; 100 and [taskDue] &amp;lt; DateTime.Date(DateTime.LocalNow())) then true else false&lt;BR /&gt;&lt;BR /&gt;&amp;lt;&amp;gt; here means not equals, and taskDue is the name of the due date column, so if it has a due date and the progress isn't 100 (%... it's planner data, which isn't a decimal like you normally see) and the due date is less than today, then it's overdue. Then you can use that column in a filter/slicer. Date.AddDays() can add days to a date field for the comparison too.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2024 18:03:26 GMT</pubDate>
    <dc:creator>christinepayton</dc:creator>
    <dc:date>2024-09-03T18:03:26Z</dc:date>
    <item>
      <title>Filtering data table based on Today +14 days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4127966#M163938</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to ask for help since I just started using PowerBI and bumped into problem I cannot solve yet.&lt;/P&gt;&lt;P&gt;I can know a little bit of programming but this whole PowerBI/DAX is new to me (not sure if this is the correct topic even).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a data table streamed from sharepoint list which is a MS Project file basically.&lt;/P&gt;&lt;P&gt;For some charts I would need this table to be filtered based on the task start date/due date (format:&amp;nbsp;2025. 12. 18. 16:00:00), to see the current tasks ongoing and the upcoming work within two weeks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Criteria 1: startdate &amp;lt; today &amp;lt; due date&lt;/P&gt;&lt;P&gt;Criteria 2: today &amp;lt; startdate &amp;lt; today + 14&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This file is in PowerBI desktop for now but I intend to upload it online. (I read somewhere maybe DAX code will not go with it?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated, I'm kinda in the dark here.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Aug 2024 13:22:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4127966#M163938</guid>
      <dc:creator>MiklosSz</dc:creator>
      <dc:date>2024-08-31T13:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data table based on Today +14 days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4131506#M164101</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are still searching for this to solve, Please share sample data.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 14:22:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4131506#M164101</guid>
      <dc:creator>Rupak_bi</dc:creator>
      <dc:date>2024-09-03T14:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data table based on Today +14 days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4131801#M164119</link>
      <description>&lt;P&gt;You probably want some Power Query calculations to return true/false or some sort of text label that makes sense to filter on (e.g. a column for "starting soon" true/false, or "late" true/false to use as filters). You can do custom columns in Power Query in the toolbar, the calculations aren't super difficult but they are pretty strict about syntax - so you can add days to a date field, then compare it to today's date, and return something for different cases in an if-statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for example, I have a report that uses task data that has a flag for overdue that looks like this:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if ([taskDue] &amp;lt;&amp;gt; null and [taskProgress] &amp;lt;&amp;gt; 100 and [taskDue] &amp;lt; DateTime.Date(DateTime.LocalNow())) then true else false&lt;BR /&gt;&lt;BR /&gt;&amp;lt;&amp;gt; here means not equals, and taskDue is the name of the due date column, so if it has a due date and the progress isn't 100 (%... it's planner data, which isn't a decimal like you normally see) and the due date is less than today, then it's overdue. Then you can use that column in a filter/slicer. Date.AddDays() can add days to a date field for the comparison too.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 18:03:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4131801#M164119</guid>
      <dc:creator>christinepayton</dc:creator>
      <dc:date>2024-09-03T18:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering data table based on Today +14 days</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4137094#M164330</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, this post was marked as spam for some reason so I tried at another forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution which worked for me is this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;When =&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;switch&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[StartDate]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;today&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;"Today"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Startdate]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;today&lt;/SPAN&gt;&lt;SPAN&gt;() &amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[Startdate]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;today&lt;/SPAN&gt;&lt;SPAN&gt;()+&lt;/SPAN&gt;&lt;SPAN&gt;14&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Soon"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Startdate]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;today&lt;/SPAN&gt;&lt;SPAN&gt;() &amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;[DueDate]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;today&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;"Past"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;today&lt;/SPAN&gt;&lt;SPAN&gt;()&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;[StartDate]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;amp;&amp;amp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;today&lt;/SPAN&gt;&lt;SPAN&gt;()&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;[DueDate]&lt;/SPAN&gt;&lt;SPAN&gt;,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Present"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[Startdate]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;today&lt;/SPAN&gt;&lt;SPAN&gt;()+&lt;/SPAN&gt;&lt;SPAN&gt;14&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"Future"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This basically divides the past works, ongoing works, expected start of works "soon", and future works plus I added today's starting works as an added coloum to my data table.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2024 08:16:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filtering-data-table-based-on-Today-14-days/m-p/4137094#M164330</guid>
      <dc:creator>MiklosSz</dc:creator>
      <dc:date>2024-09-06T08:16:34Z</dc:date>
    </item>
  </channel>
</rss>

