<?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 orders with specific conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761376#M146751</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704574" data-lia-user-login="gkarlo" class="lia-mention lia-mention-user"&gt;gkarlo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;No of No Realized =
COUNTROWS (
    FILTER (
        ADDCOLUMNS(
        SUMMARIZE (
            SampleData,
            SampleData[Project],
            "MaxStatus", MAX ( SampleData[StatusValue] )
        ),
        "SumProject",SUMX(RELATEDTABLE(ProjectList),ProjectList[Price])
        ),
        [MaxStatus] = 1
    )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 13 Mar 2024 17:31:30 GMT</pubDate>
    <dc:creator>govindarajan_d</dc:creator>
    <dc:date>2024-03-13T17:31:30Z</dc:date>
    <item>
      <title>Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3758662#M146637</link>
      <description>&lt;P&gt;I hope someone may assist me with this...&lt;/P&gt;&lt;P&gt;Currently I have a table of projects that can be Won, Lost or No Realized, the column of this os really exisiting, the problem that I have is that the same project can have No Realized and Won Status in different dates, or Not Realized and Lost Status. However, I would like to know how many orders I have with No Realized Status if the project doesn't have status of Won or Lost previously&lt;/P&gt;&lt;P&gt;example of the table&lt;/P&gt;&lt;P&gt;-----------------------------&lt;/P&gt;&lt;P&gt;Project | Status&lt;/P&gt;&lt;P&gt;A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| No Realized&lt;/P&gt;&lt;P&gt;A. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Won&lt;/P&gt;&lt;P&gt;B &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| No Realized&lt;/P&gt;&lt;P&gt;C. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | No Realized&lt;/P&gt;&lt;P&gt;C. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Lost&lt;/P&gt;&lt;P&gt;D. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | No Realized&lt;/P&gt;&lt;P&gt;D. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Lost&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;E. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | No Realized&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;F &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | No Realized&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;---------------------------&lt;/P&gt;&lt;P&gt;So the result should be: &amp;nbsp;&lt;BR /&gt;won projects: 1&lt;/P&gt;&lt;P&gt;lost projects: &amp;nbsp; 2&lt;/P&gt;&lt;P&gt;No realized projects: 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 17:35:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3758662#M146637</guid>
      <dc:creator>gkarlo</dc:creator>
      <dc:date>2024-03-12T17:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3758790#M146643</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704574" data-lia-user-login="gkarlo" class="lia-mention lia-mention-user"&gt;gkarlo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a calculated column like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;StatusValue =
IF (
    SampleData[Status] = "No Realized",
    1,
    IF ( SampleData[Status] = "Lost", 2, 3 )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And then create 3 measures like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;No of Won =
COUNTROWS (
    FILTER (
        SUMMARIZE (
            SampleData,
            SampleData[Project],
            "MaxStatus", MAX ( SampleData[StatusValue] )
        ),
        [MaxStatus] = 3
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;No of Lost =
COUNTROWS (
    FILTER (
        SUMMARIZE (
            SampleData,
            SampleData[Project],
            "MaxStatus", MAX ( SampleData[StatusValue] )
        ),
        [MaxStatus] = 2
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;No of No Realized =
COUNTROWS (
    FILTER (
        SUMMARIZE (
            SampleData,
            SampleData[Project],
            "MaxStatus", MAX ( SampleData[StatusValue] )
        ),
        [MaxStatus] = 1
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same can be achieved using RANK formula also.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tested:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Upvote and accept as a solution if it helped!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 18:59:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3758790#M146643</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-03-12T18:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3759954#M146692</link>
      <description>&lt;P&gt;hi Govindarajan,&lt;/P&gt;&lt;P&gt;I tested it, so far it worked very nice... thanks for your support &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 08:06:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3759954#M146692</guid>
      <dc:creator>gkarlo</dc:creator>
      <dc:date>2024-03-13T08:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3760347#M146705</link>
      <description>&lt;P&gt;Hi again &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;if I would like to have the three measures in one column chart, how could I do it? cause in x-axes is not possible on power BI...  something like this, I would really apreciate your support &lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 10:34:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3760347#M146705</guid>
      <dc:creator>gkarlo</dc:creator>
      <dc:date>2024-03-13T10:34:06Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761241#M146744</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704574" data-lia-user-login="gkarlo" class="lia-mention lia-mention-user"&gt;gkarlo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you try using the stacked bar/column chart?&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;</description>
      <pubDate>Wed, 13 Mar 2024 16:28:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761241#M146744</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-03-13T16:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761347#M146749</link>
      <description>&lt;P&gt;Thanks &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;... btw I have tried to follow that you did with respect on counting the number of projects but regarding the price but I didn't have any success,&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATASAMPLE TABLE&lt;/P&gt;&lt;P&gt;Project | Status. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| No Realized.&lt;/P&gt;&lt;P&gt;A. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Won. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;B &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| No Realized.&lt;/P&gt;&lt;P&gt;C. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | No Realized.&amp;nbsp;&lt;/P&gt;&lt;P&gt;C. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Lost. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;D. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | No Realized. &amp;nbsp;&lt;/P&gt;&lt;P&gt;D. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | Lost. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;E. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | No Realized. &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;F &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | No Realized. &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;---------------------------&lt;/P&gt;&lt;P&gt;PROYECTLIST TABLE&lt;/P&gt;&lt;P&gt;Project &amp;nbsp; &amp;nbsp;| Price&lt;/P&gt;&lt;P&gt;A &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| 100€&lt;/P&gt;&lt;P&gt;A. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |100€&lt;/P&gt;&lt;P&gt;B &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| &lt;SPAN&gt;50€&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;C. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 50. €&lt;/P&gt;&lt;P&gt;C. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | &amp;nbsp;50 €&lt;/P&gt;&lt;P&gt;D. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |150 €&lt;/P&gt;&lt;P&gt;D. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 150€&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;E. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |50€&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;F &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 50€&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So the result should be: &amp;nbsp;&lt;BR /&gt;won projects: 100€&lt;/P&gt;&lt;P&gt;lost projects: &amp;nbsp; 200€&lt;/P&gt;&lt;P&gt;No realized projects: 150€&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example only I tried to change the given measure in order to sum all prices with respect on this status:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;No of No Realized =
COUNTROWS (
    FILTER (
        SUMMARIZE (
            SampleData,
            SampleData[Project],
            "MaxStatus", MAX ( SampleData[StatusValue] )
        ),
        [MaxStatus] = 1
    )
)&lt;/PRE&gt;&lt;P&gt;Instead of COUNTROW, I put SUMX&lt;/P&gt;&lt;P&gt;and for the table SampleData, I put another table that contains the price (different to the table of projects and status, but those have a linked relationship)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;I don't know which is the missing step or in this case there is another way to get the revenue value. Thanks for the given time as well and I hope you may help me &lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 17:19:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761347#M146749</guid>
      <dc:creator>gkarlo</dc:creator>
      <dc:date>2024-03-13T17:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761376#M146751</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704574" data-lia-user-login="gkarlo" class="lia-mention lia-mention-user"&gt;gkarlo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;No of No Realized =
COUNTROWS (
    FILTER (
        ADDCOLUMNS(
        SUMMARIZE (
            SampleData,
            SampleData[Project],
            "MaxStatus", MAX ( SampleData[StatusValue] )
        ),
        "SumProject",SUMX(RELATEDTABLE(ProjectList),ProjectList[Price])
        ),
        [MaxStatus] = 1
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Mar 2024 17:31:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761376#M146751</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-03-13T17:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761409#M146753</link>
      <description>&lt;P&gt;Thanks, I put the code but the measure show only the number of projects but not the sum of prices &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;(as the previous code),&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 17:50:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761409#M146753</guid>
      <dc:creator>gkarlo</dc:creator>
      <dc:date>2024-03-13T17:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761418#M146754</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704574" data-lia-user-login="gkarlo" class="lia-mention lia-mention-user"&gt;gkarlo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry about that. I missed to replace COUNTROWS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;No of No Realized =
SUMX (
    FILTER (
        ADDCOLUMNS(
        SUMMARIZE (
            SampleData,
            SampleData[Project],
            "MaxStatus", MAX ( SampleData[StatusValue] )
        ),
        "SumProject",SUMX(RELATEDTABLE(ProjectList),ProjectList[Price])
        ),
        [MaxStatus] = 1
    ),
[SumProject]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 13 Mar 2024 17:54:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761418#M146754</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-03-13T17:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761439#M146756</link>
      <description>&lt;P&gt;No worries &lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;, thanks too much, it works correctly &lt;span class="lia-unicode-emoji" title=":raising_hands:"&gt;🙌&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 18:03:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761439#M146756</guid>
      <dc:creator>gkarlo</dc:creator>
      <dc:date>2024-03-13T18:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Count orders with specific conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761890#M146787</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="704574" data-lia-user-login="gkarlo" class="lia-mention lia-mention-user"&gt;gkarlo&lt;/a&gt;, Glad it worked!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 00:41:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-orders-with-specific-conditions/m-p/3761890#M146787</guid>
      <dc:creator>govindarajan_d</dc:creator>
      <dc:date>2024-03-14T00:41:14Z</dc:date>
    </item>
  </channel>
</rss>

