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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
THENNA_41
Post Partisan
Post Partisan

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

@THENNA_41 , You need a new measure like

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

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors