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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jkaelin
Resolver I
Resolver I

CountX by Category

Hey everyone,

 

Struggling to correct write this measure.

 

I want to return the distinct count of the categories that have a status of 1, more than once.  

 

Below, the result should be 2.  I want to count each category (A & F) that have a status of 1 that is counted more than once.  Each category will have a status of 1, but I want the unique count of each category that has it listed more than once.  

 

Thoughts?  Any help is greatly appreciated.  Thank you!!

DistinctCount1.PNG

 

 

 

1 ACCEPTED SOLUTION
LivioLanzo
Solution Sage
Solution Sage

Hi @Jkaelin

 

=COUNTROWS(
    FILTER(
        VALUES( Statuses[Category] ),
        CALCULATE( COUNTROWS( Statuses ), Statuses[Status] = 1 ) > 1
    )
)

 


 


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


Proud to be a Datanaut!  

View solution in original post

2 REPLIES 2
LivioLanzo
Solution Sage
Solution Sage

Hi @Jkaelin

 

=COUNTROWS(
    FILTER(
        VALUES( Statuses[Category] ),
        CALCULATE( COUNTROWS( Statuses ), Statuses[Status] = 1 ) > 1
    )
)

 


 


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


Proud to be a Datanaut!  

@LivioLanzoDang that was fast & accurate.  You the man!!  Thank you very much.  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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