<?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 to return if currentdate is between 2 dates from fields to get true/false in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-to-return-if-currentdate-is-between-2-dates-from/m-p/3110769#M109863</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;- thank you that works!&lt;/P&gt;</description>
    <pubDate>Fri, 03 Mar 2023 15:53:12 GMT</pubDate>
    <dc:creator>8047444</dc:creator>
    <dc:date>2023-03-03T15:53:12Z</dc:date>
    <item>
      <title>IF statement to return if currentdate is between 2 dates from fields to get true/false</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-to-return-if-currentdate-is-between-2-dates-from/m-p/3108895#M109719</link>
      <description>&lt;P&gt;Hello, I'm looking for some advice - My goal is to be able to show or hide a message on my dashboard for report users regarding data during payroll processing and hide when this message is not valid.&lt;BR /&gt;&lt;BR /&gt;I'm trying to create a measure that will give me a 1(True) if Today() (currentdate) is between a start and end date.&amp;nbsp; Currently I have 2 fields - Payroll Processing Start and Payroll Processing End.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Example:&lt;BR /&gt;Today (3/2/23)&lt;BR /&gt;(From my table which 1 row for each pay period and columns for pay dates, processing start, processing end..etc.)&lt;BR /&gt;Payroll_Processing_Start 2/26/2023&amp;nbsp; &amp;nbsp; &amp;nbsp; Payroll_Processing_End 3/1/2023&lt;BR /&gt;I would expect my measure to return 0 (False)&lt;BR /&gt;&lt;BR /&gt;I tried an IF statement:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Payroll_Calendar&lt;/SPAN&gt;&lt;SPAN&gt;[PAYROLL_PROCESSING_START]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;TODAY()&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;Payroll_Calendar&lt;/SPAN&gt;&lt;SPAN&gt;[CURRENTPAYROLLSTART] &amp;gt;= TODAY()&amp;nbsp;&lt;BR /&gt;but I'm getting an error too many rows to evaluate....&lt;BR /&gt;So I thought I could create a measure for the start and end dates but that's not working either (or I'm doing it wrong).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 21:39:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-to-return-if-currentdate-is-between-2-dates-from/m-p/3108895#M109719</guid>
      <dc:creator>8047444</dc:creator>
      <dc:date>2023-03-02T21:39:01Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement to return if currentdate is between 2 dates from fields to get true/false</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-to-return-if-currentdate-is-between-2-dates-from/m-p/3109030#M109726</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="523567" data-lia-user-login="8047444" class="lia-mention lia-mention-user"&gt;8047444&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Measure =
  VAR __End = MAX(Payroll_Calendar[PAYROLL_PROCESSING_START])
  VAR __Start = MAX(Payroll_Calendar[CURRENTPAYROLLSTART])
  VAR __Today = TODAY()
  VAR __Result = IF( __Today &amp;gt;= __Start &amp;amp;&amp;amp; __Today &amp;lt;= __End, 1, 0)
RETURN
  __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Mar 2023 23:04:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-to-return-if-currentdate-is-between-2-dates-from/m-p/3109030#M109726</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-03-02T23:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement to return if currentdate is between 2 dates from fields to get true/false</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-to-return-if-currentdate-is-between-2-dates-from/m-p/3110769#M109863</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;- thank you that works!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 15:53:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-statement-to-return-if-currentdate-is-between-2-dates-from/m-p/3110769#M109863</guid>
      <dc:creator>8047444</dc:creator>
      <dc:date>2023-03-03T15:53:12Z</dc:date>
    </item>
  </channel>
</rss>

