<?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 Not Working As Expected in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3766741#M147059</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692779" data-lia-user-login="bkuhlmann" class="lia-mention lia-mention-user"&gt;bkuhlmann&lt;/a&gt;&amp;nbsp;You may find this helpful - &lt;A href="https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2024 13:47:12 GMT</pubDate>
    <dc:creator>Greg_Deckler</dc:creator>
    <dc:date>2024-03-15T13:47:12Z</dc:date>
    <item>
      <title>DateAdd Not Working As Expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3766729#M147055</link>
      <description>&lt;P&gt;Hi Everyone - I'm using DATEADD to compare current QTD values against QTD values from the prior year. The SQLBI article linked below indicates that I should be able to breakout last year's QTD figures by month. While my formula is correctly returning the total value, when I try to break it out by month each month shows the same number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/differences-between-dateadd-and-parallelperiod-in-dax/" target="_blank"&gt;Differences between DATEADD and PARALLELPERIOD in DAX - SQLBI&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My 2 tables are Calendar_CreateDate and Opportunity and they are joined in a bi-directional relationship, so I'm using CROSSFILTER to make it oneway for this measure bc DATEADD will not work otherwise. I'm using CALCULATETABLE to filter the calendar table to result all the dates from the start of the current quarter until today.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Prior Year (QTD)2 = 
CALCULATE(
    SELECTEDMEASURE(), 
    DATEADD(
        CALCULATETABLE(
            VALUES(Calendar_CreateDate[Create Date]), 
            CROSSFILTER(Opportunity[Opp Create Date],Calendar_CreateDate[Create Date], OneWay), 
            Calendar_CreateDate[Flag: CFQ (Create Date)] = "Y", 
            Calendar_CreateDate[Create Date] &amp;lt;= TODAY()
        ), 
        -1,
        YEAR
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the result:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;How come this isn't working for me?&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Mar 2024 13:42:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3766729#M147055</guid>
      <dc:creator>bkuhlmann</dc:creator>
      <dc:date>2024-03-15T13:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Not Working As Expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3766741#M147059</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692779" data-lia-user-login="bkuhlmann" class="lia-mention lia-mention-user"&gt;bkuhlmann&lt;/a&gt;&amp;nbsp;You may find this helpful - &lt;A href="https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008" target="_blank"&gt;https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TITHW/m-p/434008&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 13:47:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3766741#M147059</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-03-15T13:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Not Working As Expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3767060#M147081</link>
      <description>&lt;P&gt;Thanks Greg! I almost have your "Hard Way" working for me, but I'm struggling to return the correct MaxYear...I don't want the max year from the calendar table, rather I want the current year. I'm trying to filter the table to return the current year from my calendar table by using filtering it down based on Create Date = TODAY() but I'm struggling to return a single value to the variable. I've tried numerous functions to no avail. Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 15:36:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3767060#M147081</guid>
      <dc:creator>bkuhlmann</dc:creator>
      <dc:date>2024-03-15T15:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Not Working As Expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3767371#M147110</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="692779" data-lia-user-login="bkuhlmann" class="lia-mention lia-mention-user"&gt;bkuhlmann&lt;/a&gt;&amp;nbsp;Why not just Create Year = YEAR(TODAY())&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or am I missing something?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 18:11:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3767371#M147110</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2024-03-15T18:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: DateAdd Not Working As Expected</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3771969#M147366</link>
      <description>&lt;P&gt;I was trying to use my calendar table because our fiscal year does not match our calendar year, and I also need to get both the FY and FQ. I could recreate those formulas in the measure but would prefer to pull from the calendar table instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get the FY and FQ for "today" from my calendar table instead?&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 14:41:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DateAdd-Not-Working-As-Expected/m-p/3771969#M147366</guid>
      <dc:creator>bkuhlmann</dc:creator>
      <dc:date>2024-03-18T14:41:43Z</dc:date>
    </item>
  </channel>
</rss>

