<?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 and TIME function in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-and-TIME-function/m-p/3066945#M106233</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490352" data-lia-user-login="am_i_really" class="lia-mention lia-mention-user"&gt;am_i_really&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;breakfast = 
CALCULATE (
    COUNTROWS ( 'fact' ),
    FILTER (
        'fact',
        TIMEVALUE ( CALCULATE ( MAX ( 'fact'[Value] ) ) ) &amp;lt;= TIME ( 10, 00, 00 )
    )
)

lunch = 
CALCULATE (
    COUNTROWS ( 'fact' ),
    FILTER (
        'fact',
        TIMEVALUE ( CALCULATE ( MAX ( 'fact'[Value] ) ) ) &amp;gt; TIME ( 10, 00, 00 )
    )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 07 Feb 2023 19:07:28 GMT</pubDate>
    <dc:creator>smpa01</dc:creator>
    <dc:date>2023-02-07T19:07:28Z</dc:date>
    <item>
      <title>IF and TIME function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-and-TIME-function/m-p/3066922#M106228</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for a if and time dax statement that gives me the total count of rows in Table[Order Time] that are less than 10am as "breakfast" and greater than 10 as "Lunch".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 18:51:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-and-TIME-function/m-p/3066922#M106228</guid>
      <dc:creator>am_i_really</dc:creator>
      <dc:date>2023-02-07T18:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: IF and TIME function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-and-TIME-function/m-p/3066930#M106229</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490352" data-lia-user-login="am_i_really" class="lia-mention lia-mention-user"&gt;am_i_really&lt;/a&gt;&amp;nbsp;Try:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Breakfast = 
  VAR __Table = ADDCOLUMNS('Table',"__Hour",HOUR([Order Time]))
  VAR __Result = COUNTROWS(FILTER(__Table,[__Hour] &amp;lt; 10))
RETURN
  __Result



Lunch = 
  VAR __Table = ADDCOLUMNS('Table',"__Hour",HOUR([Order Time]))
  VAR __Result = COUNTROWS(FILTER(__Table,[__Hour] &amp;gt;= 10))
RETURN
  __Result&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Feb 2023 18:56:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-and-TIME-function/m-p/3066930#M106229</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-02-07T18:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: IF and TIME function</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-and-TIME-function/m-p/3066945#M106233</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="490352" data-lia-user-login="am_i_really" class="lia-mention lia-mention-user"&gt;am_i_really&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;breakfast = 
CALCULATE (
    COUNTROWS ( 'fact' ),
    FILTER (
        'fact',
        TIMEVALUE ( CALCULATE ( MAX ( 'fact'[Value] ) ) ) &amp;lt;= TIME ( 10, 00, 00 )
    )
)

lunch = 
CALCULATE (
    COUNTROWS ( 'fact' ),
    FILTER (
        'fact',
        TIMEVALUE ( CALCULATE ( MAX ( 'fact'[Value] ) ) ) &amp;gt; TIME ( 10, 00, 00 )
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Feb 2023 19:07:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/IF-and-TIME-function/m-p/3066945#M106233</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2023-02-07T19:07:28Z</dc:date>
    </item>
  </channel>
</rss>

