<?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: DateADD for single value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/1256410#M20780</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; ,&lt;/P&gt;
&lt;P&gt;Try like&lt;/P&gt;
&lt;P&gt;VAR SelectedDateCurrent = SELECTEDVALUE('Date'[Date])&lt;BR /&gt;Return DATE(year(SelectedDateCurrent),Month(SelectedDateCurrent)-1,day(SelectedDateCurrent))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Date-as-Dateadd-Decoding-Date-and-Calendar-5-5-Power-BI-Turning/ba-p/1187827" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Date-as-Dateadd-Decoding-Date-and-Calendar-5-5-Power-BI-Turning/ba-p/1187827&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;another option&lt;/P&gt;
&lt;P&gt;VAR SelectedDateCurrent = maxx('Date' , dateadd('Date'[Date],-1, month))&lt;BR /&gt;Return SelectedDateCurrent&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dateadd need continuous dates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jul 2020 15:22:30 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-07-28T15:22:30Z</dc:date>
    <item>
      <title>DateADD for single value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/1256203#M20774</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for a way to use DateADD (or previousmonth) to have the previous month of the date that I am selecting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example :&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR SelectedDateCurrent = SELECTEDVALUE('Date'[Date])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Return&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;DATEADD(SelectedDateCurrent,-1,MONTH)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Of course this code doesn't work because DateADD can only have a column as a parameter, but you have now the idea.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I am using an IF to fix it for now (if = 1 then 12) but I am looking for an easiest way.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you !&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Loveboch,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Jul 2020 14:33:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/1256203#M20774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-07-28T14:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: DateADD for single value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/1256410#M20780</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; ,&lt;/P&gt;
&lt;P&gt;Try like&lt;/P&gt;
&lt;P&gt;VAR SelectedDateCurrent = SELECTEDVALUE('Date'[Date])&lt;BR /&gt;Return DATE(year(SelectedDateCurrent),Month(SelectedDateCurrent)-1,day(SelectedDateCurrent))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Date-as-Dateadd-Decoding-Date-and-Calendar-5-5-Power-BI-Turning/ba-p/1187827" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Date-as-Dateadd-Decoding-Date-and-Calendar-5-5-Power-BI-Turning/ba-p/1187827&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;another option&lt;/P&gt;
&lt;P&gt;VAR SelectedDateCurrent = maxx('Date' , dateadd('Date'[Date],-1, month))&lt;BR /&gt;Return SelectedDateCurrent&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;dateadd need continuous dates&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:22:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/1256410#M20780</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-07-28T15:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: DateADD for single value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/1256422#M20782</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;=&lt;SPAN&gt;EDATE([DATE],-1)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank" rel="noopener"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank" rel="noopener"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:24:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/1256422#M20782</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-07-28T15:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: DateADD for single value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/4867360#M185590</link>
      <description>&lt;P&gt;This answers the original question, but I came here looking for a way to figure out the month from seven days ago. So I want something like =MONTH( EDATE(my_date_var, -7, DAY) )&lt;BR /&gt;&lt;BR /&gt;But as far as I can tell this isn't possible?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Nov 2025 21:22:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/4867360#M185590</guid>
      <dc:creator>mattAtBradyCorp</dc:creator>
      <dc:date>2025-11-05T21:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: DateADD for single value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/4867447#M185592</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1327146" data-lia-user-login="mattAtBradyCorp" class="lia-mention lia-mention-user"&gt;mattAtBradyCorp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;= MONTH( my_date_var - 7 )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Nov 2025 01:43:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateADD-for-single-value/m-p/4867447#M185592</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2025-11-06T01:43:40Z</dc:date>
    </item>
  </channel>
</rss>

