<?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: Countrows where a client works with only one sales team in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570658#M73408</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Sorry that it is difficult for me to understand what is your desired outcome.&lt;/P&gt;
&lt;P&gt;Do you want to create a calculated measure?&amp;nbsp;Is it card visualization? Is it table visualization? Do you want to create a calculated column in which table?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will be very much appreciated if you can share how your expected outcome with correct number looks like.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jun 2022 05:39:05 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2022-06-10T05:39:05Z</dc:date>
    <item>
      <title>Countrows where a client works with only one sales team</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570324#M73389</link>
      <description>&lt;P&gt;Hi,&amp;nbsp; I have what I believe will be a simple one but am struggling.&amp;nbsp; I have a sales table which has two columns [ClientID] and [Division].&amp;nbsp; I want to know how many clients have only worked with one division.&amp;nbsp; A client may work with the same division multiple times (multiple rows) but I only want to know if they have worked with one.&lt;BR /&gt;&lt;BR /&gt;Hope this makes sense.&amp;nbsp; I have managed to use a filter for a table to show the clients,&amp;nbsp; but am unable to work out a countrows function to tell me how many there are.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate anay help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 02:19:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570324#M73389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-10T02:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows where a client works with only one sales team</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570405#M73395</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but without seeing your data model, it is difficult for me to provide the most accurate solution.&lt;/P&gt;
&lt;P&gt;However, please check the below picture and the attached pbix file.&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like the attached file, and based on my sample, the below is for creating a measure to find out how many divisions are involved per client.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope the below can provide you ideas on how to create the solution that fits your data model.&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;Division count measure: =
COUNTROWS ( SUMMARIZE ( RELATEDTABLE ( Data ), Division[Division] ) )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 02:46:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570405#M73395</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-06-10T02:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows where a client works with only one sales team</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570418#M73396</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp; I have those numbers already which is good,&amp;nbsp; I just need to count the number of clients with the value = 1&lt;BR /&gt;&lt;BR /&gt;I tried this but not getting the single count I am after&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;PracticeClientDIB = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR Logical = COUNTROWS(SUMMARIZE(Sales[Client ID],Sales(Division]))&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;IF(Logical = 1, COUNTROWS(Sales))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 03:02:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570418#M73396</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-10T03:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows where a client works with only one sales team</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570478#M73400</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you for your feedback.&lt;/P&gt;
&lt;P&gt;I assume you want a Card Visualization to show a number of clients who worked with only one division.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file.&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;Count of clients who worked with only one division measure: =
COUNTROWS (
    FILTER (
        ADDCOLUMNS (
            VALUES ( Client[Client] ),
            "@divisioncount", [Division count measure:]
        ),
        [@divisioncount] = 1
    )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 10 Jun 2022 03:29:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570478#M73400</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-06-10T03:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows where a client works with only one sales team</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570626#M73406</link>
      <description>&lt;P&gt;Thank you for your help, unfortunately still not working.&amp;nbsp; If I replicate the Dax,&amp;nbsp; it is assigning every client a score of "1" and therefore the total for "Client working with one division is just the total number of clients.&lt;BR /&gt;&lt;BR /&gt;I have this which logically should work&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ClientOneDivision = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;COUNTROWS (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ADDCOLUMNS (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VALUES (Sales[Client ID]),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"@divisioncount", COUNTROWS(( SUMMARIZE(SALES,DIM_Clients[Client ID],DIM_Division[Division])))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[@divisioncount] = 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;While the measure used "COUNTROWS(( SUMMARIZE(SALES,DIM_Clients[Client ID],DIM_Division[Division])))" by itselg in a table with "Client name" will produce various scores based on how many divisions they work for, as soon as I place it in the above measure to get the toal number of =1 ,&amp;nbsp; it goes blank in a score card.&lt;BR /&gt;Not sure I'm going to solve this one and I thought ti so straight forward....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 10 Jun 2022 05:25:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570626#M73406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-10T05:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows where a client works with only one sales team</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570658#M73408</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Sorry that it is difficult for me to understand what is your desired outcome.&lt;/P&gt;
&lt;P&gt;Do you want to create a calculated measure?&amp;nbsp;Is it card visualization? Is it table visualization? Do you want to create a calculated column in which table?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will be very much appreciated if you can share how your expected outcome with correct number looks like.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 05:39:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2570658#M73408</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-06-10T05:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: Countrows where a client works with only one sales team</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2572714#M73551</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp; appreciate the help.&amp;nbsp; I just went back and started again with the solutions you suggested and they worked!&amp;nbsp; I must have been doing somethign funny with the syntax when copying.&amp;nbsp; Possibly I was using the fact table rather than related tables as per the query.&lt;/P&gt;&lt;P&gt;Thank you so much, really appreciate the effort and help on this &lt;SPAN&gt;JiHwan Kim.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jun 2022 04:31:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Countrows-where-a-client-works-with-only-one-sales-team/m-p/2572714#M73551</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-11T04:31:33Z</dc:date>
    </item>
  </channel>
</rss>

