<?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 the number of orders in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490313#M133603</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612491" data-lia-user-login="mina97" class="lia-mention lia-mention-user"&gt;mina97&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;try below just adjust your table aand column name&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;final =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'practice'&lt;/SPAN&gt;&lt;SPAN&gt;[order]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'practice'&lt;/SPAN&gt;&lt;SPAN&gt;[order]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;practice&lt;/SPAN&gt;&lt;SPAN&gt;[status]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"resumited"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider Accept it as the solution to help the other members find it more quickly. and don't forget to&lt;STRONG&gt;&amp;nbsp;give kudos&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 23 Oct 2023 03:44:34 GMT</pubDate>
    <dc:creator>Dangar332</dc:creator>
    <dc:date>2023-10-23T03:44:34Z</dc:date>
    <item>
      <title>count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3483029#M133217</link>
      <description>&lt;P&gt;i have the following data&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;order&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;stauts&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;216&lt;/TD&gt;&lt;TD&gt;submited&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;216&lt;/TD&gt;&lt;TD&gt;accepted&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;217&lt;/TD&gt;&lt;TD&gt;submited&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;217&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;resumited&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;217&lt;/TD&gt;&lt;TD&gt;accepted&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;i need to count the number of orders that got accepted without being reaplied so in this case it should give one order&amp;nbsp;&lt;/P&gt;&lt;P&gt;please help and thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 10:39:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3483029#M133217</guid>
      <dc:creator>mina97</dc:creator>
      <dc:date>2023-10-18T10:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3483094#M133221</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612491" data-lia-user-login="mina97" class="lia-mention lia-mention-user"&gt;mina97&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to solve this. here is the output.&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;&lt;LI-CODE lang="markup"&gt;AcceptedOrdersWithoutResubmit = 
CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        'Table',
        'Table'[stauts] = "accepted" &amp;amp;&amp;amp;
        NOT (
            CALCULATE(
                COUNTROWS('Table'),
                FILTER(
                    'Table',
                    'Table'[order] = EARLIER('Table'[order]) &amp;amp;&amp;amp;
                    'Table'[stauts] = "resumited"
                )
            ) &amp;gt; 0
        )
    )
)&lt;/LI-CODE&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>Wed, 18 Oct 2023 10:58:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3483094#M133221</guid>
      <dc:creator>rubayatyasmin</dc:creator>
      <dc:date>2023-10-18T10:58:35Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3489562#M133563</link>
      <description>&lt;P&gt;hey i am really happy with the code BUT i need it to count the distict number of orders &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 07:08:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3489562#M133563</guid>
      <dc:creator>mina97</dc:creator>
      <dc:date>2023-10-22T07:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3489621#M133568</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="565196" data-lia-user-login="rubayatyasmin" class="lia-mention lia-mention-user"&gt;rubayatyasmin&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Oct 2023 09:53:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3489621#M133568</guid>
      <dc:creator>mina97</dc:creator>
      <dc:date>2023-10-22T09:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490302#M133600</link>
      <description>&lt;P&gt;sorry but the output is wrong ..... it deleted the resubmitted row but it still counted the order as accepted from the first time ... the out put is = 4 where it should be 1&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 03:32:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490302#M133600</guid>
      <dc:creator>mina97</dc:creator>
      <dc:date>2023-10-23T03:32:57Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490313#M133603</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612491" data-lia-user-login="mina97" class="lia-mention lia-mention-user"&gt;mina97&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;try below just adjust your table aand column name&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;final =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'practice'&lt;/SPAN&gt;&lt;SPAN&gt;[order]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'practice'&lt;/SPAN&gt;&lt;SPAN&gt;[order]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;practice&lt;/SPAN&gt;&lt;SPAN&gt;[status]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"resumited"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider Accept it as the solution to help the other members find it more quickly. and don't forget to&lt;STRONG&gt;&amp;nbsp;give kudos&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Oct 2023 03:44:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490313#M133603</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-10-23T03:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490321#M133606</link>
      <description>&lt;P&gt;wrong it gives 0 &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 03:50:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490321#M133606</guid>
      <dc:creator>mina97</dc:creator>
      <dc:date>2023-10-23T03:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490323#M133607</link>
      <description>&lt;P&gt;Hi, &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612491" data-lia-user-login="mina97" class="lia-mention lia-mention-user"&gt;mina97&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It give 1 as a output for code which I provide .&lt;/P&gt;&lt;P&gt;For above data it give 1 as a output&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 03:55:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490323#M133607</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-10-23T03:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490333#M133610</link>
      <description>&lt;P&gt;i used the same data as you it did NOT &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 03:59:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490333#M133610</guid>
      <dc:creator>mina97</dc:creator>
      <dc:date>2023-10-23T03:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490354#M133612</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612491" data-lia-user-login="mina97" class="lia-mention lia-mention-user"&gt;mina97&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;final =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'status'&lt;/SPAN&gt;&lt;SPAN&gt;[order]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;b&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DISTINCTCOUNT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'status'&lt;/SPAN&gt;&lt;SPAN&gt;[order]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'status'&lt;/SPAN&gt;&lt;SPAN&gt;[stauts]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;"resumited"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;SPAN&gt;b&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;For download .pbix click&amp;nbsp;&lt;A href="https://drive.google.com/file/d/1Q5wX9hTrM5qngqsYbYXmFfFzQmj0aSlR/view?usp=sharing" target="_blank" rel="noopener"&gt;HERE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 04:25:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490354#M133612</guid>
      <dc:creator>Dangar332</dc:creator>
      <dc:date>2023-10-23T04:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490356#M133613</link>
      <description>&lt;P&gt;you are missing the point &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; if i wanted this output i would have done it myself &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 04:27:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490356#M133613</guid>
      <dc:creator>mina97</dc:creator>
      <dc:date>2023-10-23T04:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490358#M133614</link>
      <description>&lt;P&gt;okay thank you for trying some one else will help as i wish hopfully&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 04:28:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490358#M133614</guid>
      <dc:creator>mina97</dc:creator>
      <dc:date>2023-10-23T04:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490819#M133657</link>
      <description>&lt;P&gt;Hi, I am a bit busy these days. I will reply ASAP.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2023 08:51:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3490819#M133657</guid>
      <dc:creator>rubayatyasmin</dc:creator>
      <dc:date>2023-10-23T08:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: count the number of orders</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3501181#M134252</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="612491" data-lia-user-login="mina97" class="lia-mention lia-mention-user"&gt;mina97&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created a sample pbix file(see &lt;EM&gt;&lt;STRONG&gt;the attachment&lt;/STRONG&gt;&lt;/EM&gt;), please check if that is what you want.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag = 
VAR _tab1 =
    CALCULATETABLE (
        VALUES ( 'Table'[order] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[stauts] = "accepted" )
    )
VAR _tab2 =
    CALCULATETABLE (
        VALUES ( 'Table'[order] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[order]
                IN _tab1
                    &amp;amp;&amp;amp; 'Table'[stauts] = "resumited"
        )
    )
VAR _tab =
    EXCEPT ( _tab1, _tab2 )
RETURN
    IF ( SELECTEDVALUE ( 'Table'[order] ) IN _tab, 1, 0 )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Number of orders = SUMX(VALUES('Table'[order]),[Flag])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2023 11:30:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/count-the-number-of-orders/m-p/3501181#M134252</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-27T11:30:24Z</dc:date>
    </item>
  </channel>
</rss>

