<?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: Dax + 365 days between two dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1066130#M14891</link>
    <description>&lt;P&gt;Will this formula allow me to add a third date column in i have realised i need a 3rd column if the start date is blank then +365 days from the created date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks sorry to be a pain i tried to amend the forumla with the third column and thowing back an error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Next Review = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var d1= CALCULATE(SELECTEDVALUE('Mi-Review Report'[Last Review]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var d2= CALCULATE(SELECTEDVALUE('Mi-Review Report'[Start Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var d3= CALCULATE(SELECTEDVALUE('Mi-Review Report'[Create Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var result= IF(OR(ISBLANK(d1),d2+365,d3+365,d1+365))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 04 May 2020 09:29:55 GMT</pubDate>
    <dc:creator>Malps90</dc:creator>
    <dc:date>2020-05-04T09:29:55Z</dc:date>
    <item>
      <title>Dax + 365 days between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1050492#M14355</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am having a problem writing DAX what i am looking to do is if (date colunm1) has a date then return date + 365 days if Blank then use ( date column 2) and return date + 365 days.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is for my apraisal dashbaord.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 09:57:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1050492#M14355</guid>
      <dc:creator>Malps90</dc:creator>
      <dc:date>2020-04-27T09:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dax + 365 days between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1050562#M14360</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225052" data-lia-user-login="Malps90" class="lia-mention lia-mention-user"&gt;Malps90&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since this is a data preparation activity I would recommend you to implement the same in Edit Query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try the below example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtQ11DUyMDJQ0lFSitWJVgLSRjCh2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type date}, {"Column2", type date}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Date", each if [Column1]=null then Date.AddDays([Column2],365) else Date.AddDays([Column1],365))
in
    #"Added Custom"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&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;&lt;BR /&gt;Below is the DAX logic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Date1 = 
var d1= CALCULATE(SELECTEDVALUE('Table'[Column1]))
var d2= CALCULATE(SELECTEDVALUE('Table'[Column2]))
var result= IF(ISBLANK(d1),d2+365,d1+365)
return result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 10:41:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1050562#M14360</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-04-27T10:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dax + 365 days between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1050670#M14365</link>
      <description>&lt;P&gt;Thank you very much this worked exactly how i wanted it too.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im new to this platform so trying to work everything out i know what i want it to do but just cannot write it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Apr 2020 11:32:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1050670#M14365</guid>
      <dc:creator>Malps90</dc:creator>
      <dc:date>2020-04-27T11:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dax + 365 days between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1066130#M14891</link>
      <description>&lt;P&gt;Will this formula allow me to add a third date column in i have realised i need a 3rd column if the start date is blank then +365 days from the created date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks sorry to be a pain i tried to amend the forumla with the third column and thowing back an error&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Next Review = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var d1= CALCULATE(SELECTEDVALUE('Mi-Review Report'[Last Review]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var d2= CALCULATE(SELECTEDVALUE('Mi-Review Report'[Start Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var d3= CALCULATE(SELECTEDVALUE('Mi-Review Report'[Create Date]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var result= IF(OR(ISBLANK(d1),d2+365,d3+365,d1+365))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return result&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 May 2020 09:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1066130#M14891</guid>
      <dc:creator>Malps90</dc:creator>
      <dc:date>2020-05-04T09:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Dax + 365 days between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1066309#M14896</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="225052" data-lia-user-login="Malps90" class="lia-mention lia-mention-user"&gt;Malps90&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Next Review =
VAR d1 =
    CALCULATE (
        SELECTEDVALUE ( 'Mi-Review Report'[Last Review] )
    )
VAR d2 =
    CALCULATE (
        SELECTEDVALUE ( 'Mi-Review Report'[Start Date] )
    )
VAR d3 =
    CALCULATE (
        SELECTEDVALUE ( 'Mi-Review Report'[Create Date] )
    )
VAR result =
    IF (
        ISBLANK ( d1 ),
        IF (
            ISBLANK ( d2 ),
            d3 + 365,
            d2 + 365
        ),
        d1 + 365
    )
RETURN
    result&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Did I answer your question? Mark my post as a solution!&lt;BR /&gt;Appreciate with a kudos &lt;/STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 10:23:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1066309#M14896</guid>
      <dc:creator>nandukrishnavs</dc:creator>
      <dc:date>2020-05-04T10:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dax + 365 days between two dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1067869#M14944</link>
      <description>&lt;P&gt;Thank you this worker exactly how I wanted it too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really appreciate your support.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2020 20:52:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-365-days-between-two-dates/m-p/1067869#M14944</guid>
      <dc:creator>Malps90</dc:creator>
      <dc:date>2020-05-04T20:52:17Z</dc:date>
    </item>
  </channel>
</rss>

