<?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 - If &amp;quot;Date1&amp;quot; is blank, then &amp;quot;Date2&amp;quot;, if both are blank, &amp;quot;Date 3&amp;quot; in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608308#M139428</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="667285" data-lia-user-login="jmetf150" class="lia-mention lia-mention-user"&gt;jmetf150&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One example of using a calculated column is if all 3 dates are columns from the same table.&amp;nbsp; If the result is not meant to be dynamic, a calculated column would work since they are only evaluated once at refresh time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One example of using a measure would be if the 3 dates are measures.&amp;nbsp; The tables in the underlying measures could be different tables.&amp;nbsp; By building the logic into the new measure, you could handle a dynamic scenario in which the result would be affected by slicers, filters, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Thumbs up to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474658" data-lia-user-login="ThxAlot" class="lia-mention lia-mention-user"&gt;ThxAlot&lt;/a&gt;&amp;nbsp; because until now I thought COALESCE() only had 2 parameters.)&lt;/P&gt;</description>
    <pubDate>Sat, 30 Dec 2023 16:52:17 GMT</pubDate>
    <dc:creator>gmsamborn</dc:creator>
    <dc:date>2023-12-30T16:52:17Z</dc:date>
    <item>
      <title>DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3607771#M139385</link>
      <description>&lt;P&gt;Hello - I am looking for assistance to help me learn writing DAX formulas concerning dates and blanks.&amp;nbsp; This would be very similar to an "IF" statement but trying to understand if IF or SWITCH would be better for what I need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Per the below table, I am trying to write a formula that will tell me this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Show me Org date unless there is a Res date, then show me the Res date.&amp;nbsp; If both are blank, show me the Del date.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;Org&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Res&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;Del&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;New (Outcome)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;5/26/90&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;6/28/90&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;6/15/91&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 6/28/90&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#FF6600"&gt;3/5/91&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;4/25/91&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 3/5/91&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;6/15/91&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 6/15/91&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 29 Dec 2023 23:40:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3607771#M139385</guid>
      <dc:creator>jmetf150</dc:creator>
      <dc:date>2023-12-29T23:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3607940#M139408</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="667285" data-lia-user-login="jmetf150" class="lia-mention lia-mention-user"&gt;jmetf150&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would something like this help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;NewDate = COALESCE( [Res], COALESCE( [Org], [Del] ) )&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should be able to be used as a calculated column or as a measure.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2023 04:11:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3607940#M139408</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2023-12-30T04:11:52Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3607994#M139411</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="667285" data-lia-user-login="jmetf150" class="lia-mention lia-mention-user"&gt;jmetf150&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;it depend on your conditions&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you have one or two condition then use IF() function .you can use if&amp;nbsp; when more then two condition but it little bit hard .&lt;/P&gt;&lt;P&gt;if you have more than two condition then easy to use switch() function. but in switch sequence matter if sequence is not in correct order then it give unexpected result&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With IF() function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;column =
  if(
   tablename[res]&amp;lt;&amp;gt;blank(),tablename[res],
    if(
     tablename[org]&amp;lt;&amp;gt;blank(),tablename[res],tablename[del]
    )
   )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With switch() function&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;column=
switch(
  true(),
  tablename[res]&amp;lt;&amp;gt;blank(),tablename[res],
  tablename[org]&amp;lt;&amp;gt;blank(),tablename[org],
 tablename[del]
)&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;</description>
      <pubDate>Sat, 30 Dec 2023 06:30:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3607994#M139411</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-12-30T06:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608288#M139424</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;= COALESCE( [Res], [Org], [Del] )&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2023 14:55:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608288#M139424</guid>
      <dc:creator>ThxAlot</dc:creator>
      <dc:date>2023-12-30T14:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608303#M139425</link>
      <description>&lt;P&gt;Thanks Alot ThxAlot!&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; I tried your proposed solution first because it was very simple to write/understand (at least for a newbie anyway).&amp;nbsp; I am going to read more about the COALESCE function to better understand its purpose and when to use it.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2023 15:59:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608303#M139425</guid>
      <dc:creator>jmetf150</dc:creator>
      <dc:date>2023-12-30T15:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608305#M139426</link>
      <description>&lt;P&gt;Thank you for your solution.&amp;nbsp; Both the IF and SWITCH worked also.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2023 16:05:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608305#M139426</guid>
      <dc:creator>jmetf150</dc:creator>
      <dc:date>2023-12-30T16:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608307#M139427</link>
      <description>&lt;P&gt;What is the difference between a "Calculated Column" and a "Measure"?&amp;nbsp; Why would you use one over the other?&amp;nbsp; What are the benefits of using either?&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2023 16:06:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608307#M139427</guid>
      <dc:creator>jmetf150</dc:creator>
      <dc:date>2023-12-30T16:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608308#M139428</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="667285" data-lia-user-login="jmetf150" class="lia-mention lia-mention-user"&gt;jmetf150&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One example of using a calculated column is if all 3 dates are columns from the same table.&amp;nbsp; If the result is not meant to be dynamic, a calculated column would work since they are only evaluated once at refresh time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One example of using a measure would be if the 3 dates are measures.&amp;nbsp; The tables in the underlying measures could be different tables.&amp;nbsp; By building the logic into the new measure, you could handle a dynamic scenario in which the result would be affected by slicers, filters, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Thumbs up to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474658" data-lia-user-login="ThxAlot" class="lia-mention lia-mention-user"&gt;ThxAlot&lt;/a&gt;&amp;nbsp; because until now I thought COALESCE() only had 2 parameters.)&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2023 16:52:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608308#M139428</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2023-12-30T16:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: DAX - If "Date1" is blank, then "Date2", if both are blank, "Date 3"</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608370#M139430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="667285" data-lia-user-login="jmetf150" class="lia-mention lia-mention-user"&gt;jmetf150&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After re-reading your question, I realized my answer was specific to this thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need a more general description, this should get you started.&lt;/P&gt;&lt;P&gt;&lt;A href="https://dash-intel.com/powerbi/modeling_measure+calculated+columns.php#:~:text=A%20measure%20is%20sometimes%20incorrectly,be%20used%20as%20a%20filter" target="_blank" rel="noopener"&gt;https://dash-intel.com/powerbi/modeling_measure+calculated+columns.php#:~:text=A%20measure%20is%20sometimes%20incorrectly,be%20used%20as%20a%20filter&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Dec 2023 17:39:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-If-quot-Date1-quot-is-blank-then-quot-Date2-quot-if-both-are/m-p/3608370#M139430</guid>
      <dc:creator>gmsamborn</dc:creator>
      <dc:date>2023-12-30T17:39:44Z</dc:date>
    </item>
  </channel>
</rss>

