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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Sriku
Helper IV
Helper IV

count distinct customer using countif formula

Hi Team,

 I am trying to count distinct customer discount percentage is > 15% same "COUNTIF(M15:M425,">"&15%)".

 

while applying filter formula like sales date; it doesnot give proper result count
 
How to achieve this? Please assist
 
Regards,
Srikant
1 ACCEPTED SOLUTION

Hi @Sriku ,

 

Sorry for that we have a little confused about your issue.

How percentage is calculated?

We create a sample, and use the following measure to get the count.

 

cou1.jpg

 

Count = 
CALCULATE(DISTINCTCOUNT('Table'[customer]),FILTER('Table',[%]>=0.15))

 

cou2.jpg

 

If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data or describe the fields of each tables and the relations between tables simply?

It will be helpful if you can show us the exact expected result based on the tables.

 

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

BTW, pbix as attached.

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Sriku , with few assumptions measure for discount percentage, is [discount percentage] , and customer group by

 

countx(filter(summarize(Table,Table[customer], "_1", [discount percentage]),[_1]>.15),[customer])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit,

 

Getting a error message "Too few agruments were passed to countx function.The minimum count of hte function is 2

 

Regards,

Srikant

Hi @Sriku ,

 

Sorry for that we have a little confused about your issue.

How percentage is calculated?

We create a sample, and use the following measure to get the count.

 

cou1.jpg

 

Count = 
CALCULATE(DISTINCTCOUNT('Table'[customer]),FILTER('Table',[%]>=0.15))

 

cou2.jpg

 

If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data or describe the fields of each tables and the relations between tables simply?

It will be helpful if you can show us the exact expected result based on the tables.

 

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

BTW, pbix as attached.

FarhanAhmed
Community Champion
Community Champion

can you please post some sample data and desired results.







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

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.