<?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: DATEDIFF between DATE column and User SELECT Date in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-between-DATE-column-and-User-SELECT-Date/m-p/3558914#M137109</link>
    <description>&lt;P&gt;&lt;SPAN&gt;If the explanation is not clear, please tell me so that I can explain more.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2023 13:17:00 GMT</pubDate>
    <dc:creator>JavidRobatian</dc:creator>
    <dc:date>2023-11-29T13:17:00Z</dc:date>
    <item>
      <title>DATEDIFF between DATE column and User SELECT Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-between-DATE-column-and-User-SELECT-Date/m-p/3555826#M136864</link>
      <description>&lt;P&gt;Hello, I have a very complicated problem. Thank you for your help.&lt;BR /&gt;I have two tables in Power BI called Date and Invoice that are related&lt;BR /&gt;Now I want to calculate the DateDiff column in the invoice table as follows:&lt;BR /&gt;Using the date table and the month column, we create a date filter on the page.&lt;BR /&gt;There are two modes&lt;BR /&gt;1- The user has not selected the month, in this case:&lt;BR /&gt;DateDiff = date[invoice] - today()&lt;BR /&gt;Of course, this number must be the smallest number for each customer, for example, for customer number 10&lt;BR /&gt;11/28/2023-11/1/2023 =27&lt;BR /&gt;2- The user selects&amp;nbsp;the date of the month using the table:&lt;BR /&gt;In this case, Today() is equal to the first day of the month selected by the user, and then the DateDiff calculation changes according to the user's selection.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 07:19:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-between-DATE-column-and-User-SELECT-Date/m-p/3555826#M136864</guid>
      <dc:creator>JavidRobatian</dc:creator>
      <dc:date>2023-11-28T07:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: DATEDIFF between DATE column and User SELECT Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-between-DATE-column-and-User-SELECT-Date/m-p/3558914#M137109</link>
      <description>&lt;P&gt;&lt;SPAN&gt;If the explanation is not clear, please tell me so that I can explain more.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 13:17:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-between-DATE-column-and-User-SELECT-Date/m-p/3558914#M137109</guid>
      <dc:creator>JavidRobatian</dc:creator>
      <dc:date>2023-11-29T13:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: DATEDIFF between DATE column and User SELECT Date</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-between-DATE-column-and-User-SELECT-Date/m-p/3560351#M137215</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="652779" data-lia-user-login="JavidRobatian" class="lia-mention lia-mention-user"&gt;JavidRobatian&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;try below code&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Measure = 
var a = SELECTEDVALUE('date'[month])
var b = DATEDIFF(CALCULATE(min(invoice[date]),ALLEXCEPT(invoice,invoice[cu nu])),TODAY(),DAY)
var c = DATEDIFF(CALCULATE(min(invoice[date]),ALLEXCEPT(invoice,invoice[cu nu])),DATE(2023,a,1),DAY)
var d = IF(ISFILTERED('date'[month]),c,b)
return
d&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 30 Nov 2023 07:09:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DATEDIFF-between-DATE-column-and-User-SELECT-Date/m-p/3560351#M137215</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-11-30T07:09:54Z</dc:date>
    </item>
  </channel>
</rss>

