<?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 Unique Values based on another column, repeat value rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248667#M168219</link>
    <description>&lt;P&gt;Awesome Sauce!!!! WOrks perfectly! Is it possible to do it in a column, to indicate which client by row, did not have a sale?&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2024 17:12:28 GMT</pubDate>
    <dc:creator>mstew55</dc:creator>
    <dc:date>2024-10-18T17:12:28Z</dc:date>
    <item>
      <title>Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4246948#M168139</link>
      <description>&lt;P&gt;Hello, i have one table. Same client name can repeat 50 times, but different records based on other rows. How can count the number of clients, with all blank rows in another column? some clients can have blank rows and non blank rows. But i want to see clients with all blank rows and no non blank rows in another column&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 16:47:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4246948#M168139</guid>
      <dc:creator>mstew55</dc:creator>
      <dc:date>2024-10-17T16:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4247269#M168161</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 21:04:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4247269#M168161</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-10-17T21:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4247507#M168171</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="826865" data-lia-user-login="mstew55" class="lia-mention lia-mention-user"&gt;mstew55&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I create a table as you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Next I create a calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;IsBlankColumnB = IF('Table'[ColumnB]=BLANK(), 1, 0)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then I create a new table and a calculated column.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ClientSummary = 
SUMMARIZE(
    'Table',
    [ClientName],
    "TotalRows", COUNTROWS('Table'),
    "BlankRows", SUM('Table'[IsBlankColumnB])
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;AllBlankRows = IF([TotalRows] = [BlankRows], 1, 0)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Finally I think you can create another measure and it will give you what you want.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CountAllBlankClients = 
CALCULATE(
    COUNTROWS(ClientSummary),
    ClientSummary[AllBlankRows] = 1
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 02:57:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4247507#M168171</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-18T02:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248252#M168202</link>
      <description>&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Client&lt;/TD&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Sold&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Chris&lt;/TD&gt;&lt;TD&gt;Strawberry&lt;/TD&gt;&lt;TD&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;blackberry&lt;/TD&gt;&lt;TD&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Amber&lt;/TD&gt;&lt;TD&gt;Cherrys&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Todd&lt;/TD&gt;&lt;TD&gt;Peanuts&lt;/TD&gt;&lt;TD&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Chris&lt;/TD&gt;&lt;TD&gt;Hotdogs&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Chris&lt;/TD&gt;&lt;TD&gt;hamburger&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;John&lt;/TD&gt;&lt;TD&gt;Hotdogs&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Todd&lt;/TD&gt;&lt;TD&gt;cookies&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Amber&lt;/TD&gt;&lt;TD&gt;Granite&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bill&lt;/TD&gt;&lt;TD&gt;Icecream&lt;/TD&gt;&lt;TD&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Lacy&lt;/TD&gt;&lt;TD&gt;Walnuts&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;benny&lt;/TD&gt;&lt;TD&gt;chairs&lt;/TD&gt;&lt;TD&gt;y&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 18 Oct 2024 12:25:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248252#M168202</guid>
      <dc:creator>mstew55</dc:creator>
      <dc:date>2024-10-18T12:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248255#M168203</link>
      <description>&lt;P&gt;As you can see some clients have mutilple products, with sales and no sales. I need to identify clients with no sales regardless of product.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 12:26:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248255#M168203</guid>
      <dc:creator>mstew55</dc:creator>
      <dc:date>2024-10-18T12:26:04Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248266#M168204</link>
      <description>&lt;P&gt;Based on my example, it should be 1 client with No sales&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 12:34:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248266#M168204</guid>
      <dc:creator>mstew55</dc:creator>
      <dc:date>2024-10-18T12:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248269#M168205</link>
      <description>&lt;P&gt;Sorry 2 clients (Amber and Lacy)&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 12:35:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248269#M168205</guid>
      <dc:creator>mstew55</dc:creator>
      <dc:date>2024-10-18T12:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248529#M168214</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="826865" data-lia-user-login="mstew55" class="lia-mention lia-mention-user"&gt;mstew55&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure = 
COUNTROWS(
	FILTER(
		ADDCOLUMNS(
			VALUES(data[client]),
			"@sold", CALCULATE(MAX(data[sold]))
		),
		[@sold]=BLANK()
	)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it works like:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 15:21:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248529#M168214</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2024-10-18T15:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248667#M168219</link>
      <description>&lt;P&gt;Awesome Sauce!!!! WOrks perfectly! Is it possible to do it in a column, to indicate which client by row, did not have a sale?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 17:12:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4248667#M168219</guid>
      <dc:creator>mstew55</dc:creator>
      <dc:date>2024-10-18T17:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4249931#M168270</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="826865" data-lia-user-login="mstew55" class="lia-mention lia-mention-user"&gt;mstew55&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I think you could try creating a new table to accomplish what you need.&lt;/P&gt;
&lt;P&gt;Firstly I create a table as you mentioned.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then you can choose to create a new table and here is the DAX code.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NewTable = 
VAR _ClientsWithSales = 
    SUMMARIZE(
        FILTER(
            'Table',
            'Table'[Sold] = "y"
        ),
        'Table'[Client]
    )
RETURN
DISTINCT(
    FILTER(
        'Table',
        NOT('Table'[Client] IN _ClientsWithSales)
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Again you can choose the form you want under Report view.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 03:06:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4249931#M168270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-21T03:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4250773#M168300</link>
      <description>&lt;P&gt;Good Morning Yilong Zhou, I'm getting an error trying to use the above in calculated column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2024 12:36:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4250773#M168300</guid>
      <dc:creator>mstew55</dc:creator>
      <dc:date>2024-10-21T12:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4251758#M168364</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="826865" data-lia-user-login="mstew55" class="lia-mention lia-mention-user"&gt;mstew55&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Like I mentioned in my earlier reply.&lt;/P&gt;
&lt;P&gt;This is not a Calculated column, it is recreating a new table.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 02:49:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4251758#M168364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-22T02:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Count Unique Values based on another column, repeat value rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4258540#M168732</link>
      <description>&lt;P&gt;Would this work in Power Pivot? also what if i wanted to add a date criteria? Example Greater than Date1 and less than Date2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 19:13:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-Unique-Values-based-on-another-column-repeat-value-rows/m-p/4258540#M168732</guid>
      <dc:creator>mstew55</dc:creator>
      <dc:date>2024-10-25T19:13:55Z</dc:date>
    </item>
  </channel>
</rss>

