Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Chanleakna123
Post Prodigy
Post Prodigy

how to sum the vallue based on the distinct count

Hi all , 

i'd like to sum count based on the customer name with only distinct count , please read the blue text. 

the result of Distinct Count should be = 3 , ( Becasue the Customer Name who duplicated , count only 1 ) 
Not = 4 , 

how to acheive this ? 

I also have Flavour column , if i filter Flavour : Fruity it will be 2 , 

it i filter Strawberry , it will be 3 , if i unfilter all , it will be sum only 3. 

Abit complicate here. can anyone help me ? 😞 

thanks 

 

 

 

1.PNG

3 REPLIES 3
kcantor
Community Champion
Community Champion

@Chanleakna123 

I am not sure I am reading your request correctly. Are you wanting to count the number of  Customer Names that buy Strawberry or Fruity?

If so, use the ALL function to remove the customer name row level filter from the calculation. For example:

All Customers = CALCULATE(DISTINCTCOUNT(Table[Customer Name]), ALL(Table))





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi @kcantor  , it doesn't reflect to what i prefer , 

actually , i have issue with sum on the value based oon the distinct count of customer Name , 

When i filter something it doesn't reflect to each other ,( it counts all of the row ) , 

this is not right and this is not what i am looking for , 

i only need to see the #Customer (Distinct Customers ) of sum the value , when i filter something , it reflect to all. 

@Chanleakna123 

I do not think I am understanding your request. The distinct count should provide the number you need. I only added the filter removal to show the complete count of customers because that is how I interpreted your request.

Can you provide some sample data and maybe an example of what you expect the final result to look like (manually created).





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors