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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Count the total distinct count based the value condition

 I have a Excel data sheet for power bi Report preparation. in my datasheet have two column Product and Qty like below screen shot.

 

THENNA_41_0-1648016870190.png

Now i have QTY  changed in to COUNT(DISTINCT).  now table looks like the below 

 

THENNA_41_1-1648016971871.png

Now i want to get the count of the QTY from Distinct table . i am using three conditions below 

 

>= 4 -  i want to get  count of which are the values are Greater than  equal  to 4 

 

= 12 -  i want to get  count of which are the values equal to  12.

 

Looking for support. Thanks in advance . 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , You need a new measure like

Sumx(filter(Table, Table[Product] , "_qty", sum(Table[Qty]) ),switch(true(), [_qty] =12, 12, [_qty] >=4,4))

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.