<?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: Same Day Last Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466242#M132291</link>
    <description>&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;It is showing data from 1st Oct to 9th Oct but i want to show only &lt;STRONG&gt;9th Sep 2023&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Oct 2023 06:58:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-10-09T06:58:15Z</dc:date>
    <item>
      <title>Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466112#M132275</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Today is&lt;STRONG&gt; 9th Oct 2023&lt;/STRONG&gt; but in measure i want to show data of &lt;STRONG&gt;9th Sep 2023&lt;/STRONG&gt; and i want it using time intelligence functions please help.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 06:59:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466112#M132275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-09T06:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466191#M132284</link>
      <description>&lt;P&gt;To display data from the same day last month in Power BI or a similar data analysis tool, you can use time intelligence functions. In this case, you want to show data for October 9th, 2023, which is one month before the current date of September 9th, 2023. You can achieve this by subtracting one month from the current date.&lt;/P&gt;&lt;P&gt;Here's how you can use DAX (Data Analysis Expressions) in Power BI to create a measure that shows data for the same day last month:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SameDayLastMonth =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;[YourMeasure], -- Replace [YourMeasure] with the actual measure you want to display&lt;BR /&gt;DATEADD(CalendarTable[Date], -1, MONTH)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this formula:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;[YourMeasure] should be replaced with the measure you want to display for the same day last month.&lt;/LI&gt;&lt;LI&gt;CalendarTable[Date] should be replaced with the name of your date column in the calendar table.&lt;/LI&gt;&lt;LI&gt;DATEADD(CalendarTable[Date], -1, MONTH) subtracts one month from the current date in the specified date column.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You should have a calendar table that includes a date column that is connected to your data model. Make sure the relationships between your calendar table and other tables are properly set up for this to work.&lt;/P&gt;&lt;P&gt;Once you create this measure, you can use it in your visuals to display data for October 9th, 2023, even when the current date is September 9th, 2023.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 06:15:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466191#M132284</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-10-09T06:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466242#M132291</link>
      <description>&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;It is showing data from 1st Oct to 9th Oct but i want to show only &lt;STRONG&gt;9th Sep 2023&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 06:58:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466242#M132291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-09T06:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466251#M132293</link>
      <description>&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;It is showing 1st Sep 2023 to 9th Sep 2023 data but i want to show only&amp;nbsp;&lt;STRONG&gt;9th Sep 2023 &lt;/STRONG&gt;data&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 07:00:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466251#M132293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-09T07:00:37Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466252#M132294</link>
      <description>&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;It is showing 1st Sep 2023 to 9th Sep 2023 data but i want to show only&amp;nbsp;&lt;STRONG&gt;9th Sep 2023 &lt;/STRONG&gt;data&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 07:00:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466252#M132294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-09T07:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466268#M132295</link>
      <description>&lt;P&gt;hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;try below&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;CALCULATE(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;maxx(filter('calender table',CalendarTable[Date]'),[YourMeasure]),&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DATEADD(CalendarTable[Date], -1, MONTH)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 07:11:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466268#M132295</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-10-09T07:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466337#M132300</link>
      <description>&lt;P&gt;plz use below DAX:&lt;/P&gt;&lt;P&gt;SameDayLastMonth =&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('YourTable'[YourMeasure]),&lt;BR /&gt;FILTER('YourDateTable', 'YourDateTable'[DateColumn] = DATE(2023, 9, 9))&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;In this modified formula:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;FILTER('YourDateTable', 'YourDateTable'[DateColumn] = DATE(2023, 9, 9)) filters the 'YourDateTable' to only include the rows where the date matches September 9, 2023.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This way, the SameDayLastMonth measure will specifically show data for the 9th of September 2023, as you requested.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 07:51:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466337#M132300</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-10-09T07:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466622#M132318</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, I created the DAX expression, you may check the result below:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;New table:

Table 2 =
CALENDAR ( DATE ( 2023, 1, 1 ), TODAY () )

Measure:

Same day =
VAR _now =
    MAX ( 'Table 2'[Date] )
RETURN
    IF (
        MONTH ( _now ) &amp;lt;&amp;gt; 1,
        DATE ( YEAR ( _now ), MONTH ( _now ) - 1, DAY ( _now ) ),
        DATE ( YEAR ( _now ) - 1, MONTH ( _now ) - 1 + 12, DAY ( _now ) )
    )&lt;/LI-CODE&gt;
&lt;P&gt;An attachment for your reference. Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Community Support Team_ Scott Chang&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 10:43:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466622#M132318</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-09T10:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466667#M132320</link>
      <description>&lt;P&gt;Thanks for reply.&lt;/P&gt;&lt;P&gt;This will work for disconnected tables but in my model, dim_date table connected to Fact table. In this case, your code is not working&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 11:21:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3466667#M132320</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-09T11:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Same Day Last Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3470486#M132503</link>
      <description>&lt;P&gt;Hi Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your statement, I make a new expression You can check the result as follows:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Last month same day = 
var _pre= EOMONTH(MAX('Table'[DATE]),-1)
return DATE(YEAR(_pre),MONTH(_pre),DAY(MAX('Table'[DATE])))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps this will work, and if you have any questions, please provide me a simple sample&amp;nbsp;to make sure we can better solve the problem for you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An attachment for your reference. Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Community Support Team_ Scott Chang&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 06:57:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Same-Day-Last-Month/m-p/3470486#M132503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-11T06:57:19Z</dc:date>
    </item>
  </channel>
</rss>

