<?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: Calculate Number of days Between Today and a Date Column in the Report and also Filter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4117059#M163449</link>
    <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627309" data-lia-user-login="Dashboard_Dev" class="lia-mention lia-mention-user"&gt;Dashboard_Dev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;are you looking something like this?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create a new measure with following DAX.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;DateDIFF = &lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Date]),&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(),DAY)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hope this will help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sun, 25 Aug 2024 02:02:20 GMT</pubDate>
    <dc:creator>Irwan</dc:creator>
    <dc:date>2024-08-25T02:02:20Z</dc:date>
    <item>
      <title>Calculate Number of days Between Today and a Date Column in the Report and also Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4117049#M163448</link>
      <description>&lt;P&gt;I'm having difficulty in calculating this.&amp;nbsp;Client wants to calculate the amount of days from today (when the report is run) to an order date, but wants to filter on other column in the data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have so far, Calculate Number of Days=DATEDIFF ( MAX (&amp;nbsp;'table'[column]), TODAY(), DAY )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because some orders are canceled, on back order, out of stock, ect., they want to filter by order status (another column in the table) to omit orders that canceled, or out of stock.&amp;nbsp;How do I add a filter to the above measure?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also the data is in a semantic model, and I am not able to add a calculated column, so this needs to be done with a measure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me?&amp;nbsp; Is this even possible?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Aug 2024 01:36:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4117049#M163448</guid>
      <dc:creator>Dashboard_Dev</dc:creator>
      <dc:date>2024-08-25T01:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Number of days Between Today and a Date Column in the Report and also Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4117059#M163449</link>
      <description>&lt;P&gt;hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627309" data-lia-user-login="Dashboard_Dev" class="lia-mention lia-mention-user"&gt;Dashboard_Dev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;are you looking something like this?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;create a new measure with following DAX.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;DateDIFF = &lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;('Table'[Date]),&lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(),DAY)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Hope this will help.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 25 Aug 2024 02:02:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4117059#M163449</guid>
      <dc:creator>Irwan</dc:creator>
      <dc:date>2024-08-25T02:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Number of days Between Today and a Date Column in the Report and also Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4117109#M163453</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627309" data-lia-user-login="Dashboard_Dev" class="lia-mention lia-mention-user"&gt;Dashboard_Dev&lt;/a&gt;&amp;nbsp; As I can understand, that you have order status column and want to filter out Canceled or out of stock using your provided measure.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can use slicer as&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490030" data-lia-user-login="Irwan" class="lia-mention lia-mention-user"&gt;Irwan&lt;/a&gt;&amp;nbsp; mentioned or can use filter this visual section in filter pane to filter out unnecessary items.&lt;BR /&gt;&lt;BR /&gt;Any way, if you want to use measure, then wrap your measure inside calculate and mention filter condition. See the example below:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;NumberOfDays =&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;DATEDIFF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;TODAY&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;DAY&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ),&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Status]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;"Canceled"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'Table'&lt;/SPAN&gt;&lt;SPAN&gt;[Status]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN&gt;"Out of Stock"&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Hope this helps!!&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;If this solved your problem, please accept it as a solution.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;Best Regards,&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;Shahariar Hafiz&lt;/FONT&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 25 Aug 2024 05:50:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4117109#M163453</guid>
      <dc:creator>shafiz_p</dc:creator>
      <dc:date>2024-08-25T05:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Number of days Between Today and a Date Column in the Report and also Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4119834#M163568</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627309" data-lia-user-login="Dashboard_Dev" class="lia-mention lia-mention-user"&gt;Dashboard_Dev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I ask if your problem has been solved? If it has been resolved, please accept the responses that helped you as a solution.&lt;BR /&gt;Both solutions provided by&amp;nbsp;Irwan and shafiz_p&amp;nbsp;are valid, you can follow Irwan's solution to create a slicer to filter orders or follow shafiz_p's solution to filter out orders in the measure.&lt;/P&gt;
&lt;P&gt;If you need any other help, please feel free to contact me.&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>Tue, 27 Aug 2024 04:39:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4119834#M163568</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-27T04:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Number of days Between Today and a Date Column in the Report and also Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4121436#M163641</link>
      <description>&lt;P&gt;Neither solution solved the issue&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 19:53:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4121436#M163641</guid>
      <dc:creator>Dashboard_Dev</dc:creator>
      <dc:date>2024-08-27T19:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Number of days Between Today and a Date Column in the Report and also Filter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4121983#M163665</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="627309" data-lia-user-login="Dashboard_Dev" class="lia-mention lia-mention-user"&gt;Dashboard_Dev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please provide&amp;nbsp;sample data that covers your issue completely and the expected outcome.&amp;nbsp;This will help us understand your needs more clearly and assist you.&lt;/P&gt;
&lt;P&gt;If you are unsure how to upload data please refer to&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;How to provide sample data in the Power BI Forum - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;A friendly reminder to remember to protect your data privacy.&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>Wed, 28 Aug 2024 05:52:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Number-of-days-Between-Today-and-a-Date-Column-in-the/m-p/4121983#M163665</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-28T05:52:17Z</dc:date>
    </item>
  </channel>
</rss>

