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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
nleuck_101
Resolver III
Resolver III

Total Distinct Count filtered by the count of a particular termination reason

Hello All,

 

I'm having some trouble with creating a DAX measure that calculates a distinct count of associates that have used a specific termination reason more than once. Anyone have any ideas how I would do this? I would greatly appreciate some help!

Thanks,

2 ACCEPTED SOLUTIONS
v-jingzhang
Community Support
Community Support

Hi @nleuck_101 

 

Assume your data is similar to the following table, you can try this measure.

Measure = 
var _tbl = SUMMARIZE('Table','Table'[ID],"count of reason b",COUNTROWS(FILTER('Table','Table'[Reason]="b")))
return
COUNTROWS(FILTER(_tbl,[count of reason b]>1))

vjingzhang_0-1665121797865.pngvjingzhang_1-1665121828828.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

nleuck_101
Resolver III
Resolver III

@v-jingzhang 

Your measure does work but if I need to selected a month to filter by, the value goes Blank. I decided to create what I needed in SQL and that worked for me. Thanks for your reply!

View solution in original post

2 REPLIES 2
nleuck_101
Resolver III
Resolver III

@v-jingzhang 

Your measure does work but if I need to selected a month to filter by, the value goes Blank. I decided to create what I needed in SQL and that worked for me. Thanks for your reply!

v-jingzhang
Community Support
Community Support

Hi @nleuck_101 

 

Assume your data is similar to the following table, you can try this measure.

Measure = 
var _tbl = SUMMARIZE('Table','Table'[ID],"count of reason b",COUNTROWS(FILTER('Table','Table'[Reason]="b")))
return
COUNTROWS(FILTER(_tbl,[count of reason b]>1))

vjingzhang_0-1665121797865.pngvjingzhang_1-1665121828828.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.