<?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: COUNT and OR statement? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1328062#M23468</link>
    <description>&lt;P&gt;Hi there. Your formula does not adhere to Best Practices and hence may not be as fast as possible. Here's an optimized version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;TotalBooked =
CALCULATE(
    COUNT('Session Report'[Session Attendance]),
    KEEPFILTERS(
        TREATAS(
            {"Booked", "Attended"},
            'Session Report'[Session Attendance]
        )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2020 07:47:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-08-27T07:47:23Z</dc:date>
    <item>
      <title>COUNT and OR statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1327197#M23434</link>
      <description>&lt;P&gt;Hello PowerBI users&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wanting to use an OR function... ,not sure how to do it... here's the measure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TotalBooked = CALCULATE(COUNT('Session Report'[Session Attendance]), FILTER('Session Report', 'Session Report'[Session Attendance]=&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"Booked" OR "Attended"&lt;/STRONG&gt;&lt;/FONT&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;so we have a session status... of either Booked or Attended (as well as others, wait-listed, withdrawn, etc)... but I'm wanting to get a total of both booked or attended...&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;How best to do this?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Many thanks ahead of time.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Kind regards&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Ray&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Aug 2020 00:52:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1327197#M23434</guid>
      <dc:creator>rayinOz</dc:creator>
      <dc:date>2020-08-27T00:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT and OR statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1327322#M23439</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="21969" data-lia-user-login="rayinOz" class="lia-mention lia-mention-user"&gt;rayinOz&lt;/a&gt;&amp;nbsp;- Either will work:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TotalBooked = CALCULATE(COUNT('Session Report'[Session Attendance]), FILTER('Session Report', 'Session Report'[Session Attendance]="Booked" || 'Session Report'[Session Attendance]="Attended"))


TotalBooked = CALCULATE(COUNT('Session Report'[Session Attendance]), FILTER('Session Report', OR('Session Report'[Session Attendance]="Booked",'Session Report'[Session Attendance]="Attended")))

&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Aug 2020 01:53:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1327322#M23439</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-27T01:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT and OR statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1327551#M23446</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="21969" data-lia-user-login="rayinOz" class="lia-mention lia-mention-user"&gt;rayinOz&lt;/a&gt; , try like &lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;TotalBooked = CALCULATE(COUNT('Session Report'[Session Attendance]), FILTER('Session Report', 'Session Report'[Session Attendance] in {"Booked" ,"Attended" }))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Aug 2020 03:20:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1327551#M23446</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-27T03:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT and OR statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1328062#M23468</link>
      <description>&lt;P&gt;Hi there. Your formula does not adhere to Best Practices and hence may not be as fast as possible. Here's an optimized version:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;TotalBooked =
CALCULATE(
    COUNT('Session Report'[Session Attendance]),
    KEEPFILTERS(
        TREATAS(
            {"Booked", "Attended"},
            'Session Report'[Session Attendance]
        )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 07:47:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1328062#M23468</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-27T07:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT and OR statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1328295#M23477</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="21969" data-lia-user-login="rayinOz" class="lia-mention lia-mention-user"&gt;rayinOz&lt;/a&gt;&amp;nbsp;You can use this:&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;TotalBooked =
CALCULATE (
    COUNT ( 'Session Report'[Session Attendance] ),
    KEEPFILTERS ( 'Session Report'[Session Attendance] = "Booked"
        || 'Session Report'[Session Attendance] = "Attended" )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Or&lt;/P&gt;
&lt;LI-CODE lang="php"&gt;TotalBooked =
CALCULATE (
    COUNT ( 'Session Report'[Session Attendance] ),
    KEEPFILTERS ( 'Session Report'[Session Attendance] IN { "Booked", "Attended" } )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Aug 2020 09:05:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1328295#M23477</guid>
      <dc:creator>AntrikshSharma</dc:creator>
      <dc:date>2020-08-27T09:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: COUNT and OR statement?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1330433#M23566</link>
      <description>&lt;P&gt;Hi Daxer! Thanks so much for this, it worked perfectly!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Aug 2020 00:55:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/COUNT-and-OR-statement/m-p/1330433#M23566</guid>
      <dc:creator>rayinOz</dc:creator>
      <dc:date>2020-08-28T00:55:36Z</dc:date>
    </item>
  </channel>
</rss>

