<?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: if statement time based in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088696#M108101</link>
    <description>&lt;P&gt;For this we will convert your time to DateTime using the TimeValue and then calculate minutes using DateDiff.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DATEDIFF (TIMEVALUE(time_text) ,TIMEVALUE(time_text) ,MINUTE)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then build your switch statement or if statement for the logic.&amp;nbsp; Many ways to do this, but here are a few...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SWITCH(TRUE()
,DATEDIFF (TIMEVALUE(time_text) ,TIMEVALUE(time_text) ,MINUTE) &amp;gt; 10, 1
,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF(DATEDIFF (TIMEVALUE(time_text) ,TIMEVALUE(time_text) ,MINUTE)&amp;gt;10,1,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Feb 2023 19:23:54 GMT</pubDate>
    <dc:creator>BrianConnelly</dc:creator>
    <dc:date>2023-02-20T19:23:54Z</dc:date>
    <item>
      <title>if statement time based</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088189#M108064</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a formula to compare 2 times if less than or more than a fixed time for example,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actual 09:59&lt;/P&gt;&lt;P&gt;Target 10:00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if Actual is less than Target by 10 mins then 1 if not 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 14:33:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088189#M108064</guid>
      <dc:creator>AI14</dc:creator>
      <dc:date>2023-02-20T14:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: if statement time based</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088268#M108071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474512" data-lia-user-login="AI14" class="lia-mention lia-mention-user"&gt;AI14&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF ( DATEDIFF (&amp;nbsp;&lt;SPAN&gt;'Table[Actual]&lt;/SPAN&gt;,&amp;nbsp;&lt;SPAN&gt;'Table[Target], MINUTE ) = 10, 1, 0 )&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 02:23:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088268#M108071</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-21T02:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: if statement time based</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088299#M108073</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would i need to add a &amp;lt; to say if its less than?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 15:26:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088299#M108073</guid>
      <dc:creator>AI14</dc:creator>
      <dc:date>2023-02-20T15:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: if statement time based</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088495#M108089</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="474512" data-lia-user-login="AI14" class="lia-mention lia-mention-user"&gt;AI14&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I believe it should be difference &amp;gt; 10&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 16:55:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088495#M108089</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-02-20T16:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: if statement time based</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088696#M108101</link>
      <description>&lt;P&gt;For this we will convert your time to DateTime using the TimeValue and then calculate minutes using DateDiff.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DATEDIFF (TIMEVALUE(time_text) ,TIMEVALUE(time_text) ,MINUTE)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then build your switch statement or if statement for the logic.&amp;nbsp; Many ways to do this, but here are a few...&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SWITCH(TRUE()
,DATEDIFF (TIMEVALUE(time_text) ,TIMEVALUE(time_text) ,MINUTE) &amp;gt; 10, 1
,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;IF(DATEDIFF (TIMEVALUE(time_text) ,TIMEVALUE(time_text) ,MINUTE)&amp;gt;10,1,0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 19:23:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/if-statement-time-based/m-p/3088696#M108101</guid>
      <dc:creator>BrianConnelly</dc:creator>
      <dc:date>2023-02-20T19:23:54Z</dc:date>
    </item>
  </channel>
</rss>

