<?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: Find last Saturday of previous month and last friday  of current month end in given Date table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3969227#M153941</link>
    <description>&lt;DIV&gt;Thanks for the solution. It works perfect for me. Above solution is for dates between CALENDAR("4/1/2024", "8/31/2024"). I mean it is comparing Month(Today()).&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you please tell me for dates between 01/01/2023 to 31/12/2025. I need for past and future dates please.&lt;/DIV&gt;&lt;DIV&gt;What is the slight modification that I need&amp;nbsp;to do in Dax code?&amp;nbsp;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
    <pubDate>Mon, 03 Jun 2024 15:22:47 GMT</pubDate>
    <dc:creator>KK_007</dc:creator>
    <dc:date>2024-06-03T15:22:47Z</dc:date>
    <item>
      <title>Find last Saturday of previous month and last friday  of current month end in given Date table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3958935#M153639</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a Date/calender&amp;nbsp; Table. I need two columns. Column1 should show previous month end last Saturday in date format. Column2 should show current month end last Friday date. For example, for row1, if the previous month end last Saturday of April 2024, column1 date should be 27/04/2024 and column2 should show current month end date i.e last Friday date May 31/05/2024.&amp;nbsp;&lt;/P&gt;&lt;P&gt;And for row2 , the column1 date&amp;nbsp; should be immediate +1 of current month last Friday i.e Saturday date 01/06/2024 and column2 should be&amp;nbsp; last Friday of June&amp;nbsp; 28/06/2024. I need to see the difference between these two columns dates.&amp;nbsp; It should repeat though out the date table for all the rows.For above example, row1 difference shows&amp;nbsp; 35 days and row 2 shows difference of 28 days.&amp;nbsp; The required output shown below.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Column1.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Column2.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Days&lt;/P&gt;&lt;P&gt;Row1. 27/04/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; 31/05/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;35 days&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Row2. 01/06/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; 28/06/2024.&amp;nbsp; &amp;nbsp; &amp;nbsp;28 days&lt;/P&gt;&lt;P&gt;Row3. 29/06/2024.&amp;nbsp; &amp;nbsp; &amp;nbsp; 26/07/2024&amp;nbsp; &amp;nbsp; &amp;nbsp; 28 days&lt;/P&gt;&lt;P&gt;Row4. 28/07/2024.&amp;nbsp; &amp;nbsp; &amp;nbsp; 30/08/2024.&amp;nbsp; &amp;nbsp; &amp;nbsp;34 dayslease help me with Dax calculated coluns. Appreciate your help in advance.Than&lt;/P&gt;&lt;P&gt;ks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 19:58:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3958935#M153639</guid>
      <dc:creator>KK_007</dc:creator>
      <dc:date>2024-05-29T19:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Find last Saturday of previous month and last friday  of current month end in given Date table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3959497#M153653</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="751681" data-lia-user-login="KK_007" class="lia-mention lia-mention-user"&gt;KK_007&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;For your question, here is the method I provided:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date Table = CALENDAR("4/1/2024", "8/31/2024")&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create columns.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, you need to get weeks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;weekday = WEEKDAY('Date Table'[Date], 2)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Calculate column 1 from column 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 2 = 
CALCULATE(
    MAX('Date Table'[Date]), 
    FILTER(
        'Date Table', 
        MONTH('Date Table'[Date]) = 
        MONTH(EARLIER('Date Table'[Date])) 
        &amp;amp;&amp;amp; 
        'Date Table'[weekday] = 5
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column 1 = 
var currntMonth = MONTH(TODAY())
RETURN
IF(
    MONTH('Date Table'[Column 2]) &amp;gt;= currntMonth, 
    CALCULATE(
        SELECTEDVALUE('Date Table'[Column 2]) + 1,
        FILTER(
            ALL('Date Table'),
            MONTH('Date Table'[Column 2])= MONTH(EARLIER('Date Table'[Column 2])) - 1
        )
    ),
BLANK()
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Craete a viusal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 03:25:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3959497#M153653</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-30T03:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Find last Saturday of previous month and last friday  of current month end in given Date table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3969227#M153941</link>
      <description>&lt;DIV&gt;Thanks for the solution. It works perfect for me. Above solution is for dates between CALENDAR("4/1/2024", "8/31/2024"). I mean it is comparing Month(Today()).&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you please tell me for dates between 01/01/2023 to 31/12/2025. I need for past and future dates please.&lt;/DIV&gt;&lt;DIV&gt;What is the slight modification that I need&amp;nbsp;to do in Dax code?&amp;nbsp;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Mon, 03 Jun 2024 15:22:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3969227#M153941</guid>
      <dc:creator>KK_007</dc:creator>
      <dc:date>2024-06-03T15:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Find last Saturday of previous month and last friday  of current month end in given Date table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3976513#M154180</link>
      <description>&lt;P&gt;Can i have the same solution for past and future dates please.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 08:28:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3976513#M154180</guid>
      <dc:creator>kkanukurthi</dc:creator>
      <dc:date>2024-06-06T08:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Find last Saturday of previous month and last friday  of current month end in given Date table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3977357#M154220</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;DIV&gt;Thanks for the solution. It works perfect for me. Above solution is for dates between CALENDAR("4/1/2024", "8/31/2024"). I mean it is comparing Month(Today()).&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Can you please tell me for dates between &lt;STRONG&gt;01/01/2023 to 31/12/2025&lt;/STRONG&gt;. I need for past year and future year dates please.&lt;/DIV&gt;&lt;DIV&gt;What is the slight modification that I need&amp;nbsp;to do in Dax code?&amp;nbsp;&lt;BR /&gt;Thanks in Advance&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Jun 2024 14:31:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Find-last-Saturday-of-previous-month-and-last-friday-of-current/m-p/3977357#M154220</guid>
      <dc:creator>kkanukurthi</dc:creator>
      <dc:date>2024-06-06T14:31:21Z</dc:date>
    </item>
  </channel>
</rss>

