<?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: Caluclate unique customer count in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3901009#M152016</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="193877" data-lia-user-login="Ramgopal_PBI" class="lia-mention lia-mention-user"&gt;Ramgopal_PBI&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the information you provided, can you explain how your&amp;nbsp;"&lt;SPAN&gt;unique customers"&lt;/SPAN&gt; was calculated to get it. If you do not mind could you also provide some detailed data (without sensitive information), providing specific data and clearly expressing the results you want can help us better understand your problem.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Wed, 08 May 2024 05:45:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-08T05:45:07Z</dc:date>
    <item>
      <title>Caluclate unique customer count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3899421#M151969</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;A customer is purchasing products from multiple distributors. if&amp;nbsp; morethan 80%&amp;nbsp; value is purchased from one distributor then the customer is unique to that distributor. As shown in the below table1, A customer C9499 purchase products from four distributors but unique to the distributor D62.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Distributor&lt;/TD&gt;&lt;TD&gt;Customer&lt;/TD&gt;&lt;TD&gt;Total Sales&lt;/TD&gt;&lt;TD&gt;Sales%&lt;/TD&gt;&lt;TD&gt;Unique customer&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D19&lt;/TD&gt;&lt;TD&gt;C9499&lt;/TD&gt;&lt;TD&gt;$1,500&lt;/TD&gt;&lt;TD&gt;3.43%&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D51&lt;/TD&gt;&lt;TD&gt;C9499&lt;/TD&gt;&lt;TD&gt;$2,982&lt;/TD&gt;&lt;TD&gt;6.81%&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D62&lt;/TD&gt;&lt;TD&gt;C9499&lt;/TD&gt;&lt;TD&gt;$38,860&lt;/TD&gt;&lt;TD&gt;88.79%&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D91&lt;/TD&gt;&lt;TD&gt;C9499&lt;/TD&gt;&lt;TD&gt;$426&lt;/TD&gt;&lt;TD&gt;0.97%&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Total&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;$43,768&lt;/TD&gt;&lt;TD&gt;100%&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how to caluclate number of unique customers for each distributor like below table2 using DAX in PowerBI&amp;nbsp; with dynamic filter selection ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Distributor&lt;/TD&gt;&lt;TD&gt;Total No of Customers&lt;/TD&gt;&lt;TD&gt;No of Unique Customers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D19&lt;/TD&gt;&lt;TD&gt;1314&lt;/TD&gt;&lt;TD&gt;949&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D51&lt;/TD&gt;&lt;TD&gt;1286&lt;/TD&gt;&lt;TD&gt;953&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D62&lt;/TD&gt;&lt;TD&gt;1321&lt;/TD&gt;&lt;TD&gt;966&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D91&lt;/TD&gt;&lt;TD&gt;1236&lt;/TD&gt;&lt;TD&gt;918&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Grand Total&lt;/TD&gt;&lt;TD&gt;5157&lt;/TD&gt;&lt;TD&gt;3786&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data has following fields&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Distributor ,&lt;/TD&gt;&lt;TD&gt;Region ,&lt;/TD&gt;&lt;TD&gt;Country,&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Quarter,&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Product ,&lt;/TD&gt;&lt;TD&gt;Customer ,&lt;/TD&gt;&lt;TD&gt;Units ,&lt;/TD&gt;&lt;TD&gt;Unit Price ,&lt;/TD&gt;&lt;TD&gt;Total Sales&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2024 15:16:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3899421#M151969</guid>
      <dc:creator>Ramgopal_PBI</dc:creator>
      <dc:date>2024-05-07T15:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: Caluclate unique customer count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3901009#M152016</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="193877" data-lia-user-login="Ramgopal_PBI" class="lia-mention lia-mention-user"&gt;Ramgopal_PBI&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the information you provided, can you explain how your&amp;nbsp;"&lt;SPAN&gt;unique customers"&lt;/SPAN&gt; was calculated to get it. If you do not mind could you also provide some detailed data (without sensitive information), providing specific data and clearly expressing the results you want can help us better understand your problem.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Ada Wang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;EM&gt;&lt;STRONG&gt;&amp;nbsp;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2024 05:45:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3901009#M152016</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-08T05:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Caluclate unique customer count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3905778#M152155</link>
      <description>&lt;P&gt;Hi Ada Wang,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have 100 distributors and 10000 customers in the sample data. A customuer bought products from the multiple distributors , if the customer bought mostly (above 80%) from one distributor then the customer is unique. Let say If the customer 'C' bought total 100$ from three distributors&amp;nbsp; D1,D2 and D3 10$,7$ and 83$ respectively.Here the customer 'C' is bought morethan 80% value from the distributor D3 , hence the customer 'C' is unique.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sales% bought from D1 = 10/(10+7+83)&lt;/P&gt;&lt;P&gt;Sales% bought from D2 = 7/(10+7+83)&lt;/P&gt;&lt;P&gt;Sales% bought from D3 = 83/(10+7+83)&lt;/P&gt;&lt;P&gt;Now need to caluclate the number of unique customers by Distributor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The required output is&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Distributor&lt;/TD&gt;&lt;TD&gt;Total No of Customers&lt;/TD&gt;&lt;TD&gt;No of Unique Customers&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D19&lt;/TD&gt;&lt;TD&gt;1314&lt;/TD&gt;&lt;TD&gt;949&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D51&lt;/TD&gt;&lt;TD&gt;1286&lt;/TD&gt;&lt;TD&gt;953&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D62&lt;/TD&gt;&lt;TD&gt;1321&lt;/TD&gt;&lt;TD&gt;966&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;D91&lt;/TD&gt;&lt;TD&gt;1236&lt;/TD&gt;&lt;TD&gt;918&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Grand Total&lt;/TD&gt;&lt;TD&gt;5157&lt;/TD&gt;&lt;TD&gt;3786&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample Data file :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.google.com/spreadsheets/d/1jJnXYD5bA6tMzsdQctbiosBFfjVhte-r/edit?usp=drive_link&amp;amp;ouid=116049087228969145745&amp;amp;rtpof=true&amp;amp;sd=true" target="_self"&gt;https://docs.google.com/spreadsheets/d/1jJnXYD5bA6tMzsdQctbiosBFfjVhte-r/edit?usp=drive_link&amp;amp;ouid=116049087228969145745&amp;amp;rtpof=true&amp;amp;sd=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PBIX File:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/11BnGBM1aFVas4ewdaK8caJNS6_WoiETg/view?usp=drive_link" target="_blank" rel="noopener"&gt;https://drive.google.com/file/d/11BnGBM1aFVas4ewdaK8caJNS6_WoiETg/view?usp=drive_link&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This might be achived through nested aggregations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Step 1 : Distributor , Customer, Sales%&lt;/P&gt;&lt;P&gt;Step2: Distributor,Customer count where Sales% &amp;gt;80%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Ram&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2024 14:02:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3905778#M152155</guid>
      <dc:creator>Ramgopal_PBI</dc:creator>
      <dc:date>2024-05-09T14:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Caluclate unique customer count</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3910915#M152314</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="193877" data-lia-user-login="Ramgopal_PBI" class="lia-mention lia-mention-user"&gt;Ramgopal_PBI&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try below measure.&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;No of Unique Customers = 
COUNTROWS(
    FILTER(
        ALLSELECTED('Distributor Sales'[Customer]),
        CALCULATE(
            DIVIDE(
                SUM('Distributor Sales'[Total Sales]),
                CALCULATE(
                    SUM('Distributor Sales'[Total Sales]),
                    ALLSELECTED('Distributor Sales'[Distributor])
                )
            )
        )&amp;gt;0.8
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark this as solution and give Kudos, if this helps resolve your issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you~&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 16:00:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Caluclate-unique-customer-count/m-p/3910915#M152314</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-05-11T16:00:13Z</dc:date>
    </item>
  </channel>
</rss>

