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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
TBSST
Frequent Visitor

Counting No. of clients with a sum above X

Hi All, 

 

I am trying to work on a DAX function to allow me to count all type of jobs per client, then show me a calcucated number in a card for how many clients have met that particular threshold of a specific job. 

 

ClientJob
1a
1a
1a
1b
1b
1c
2a
2a
2b
2c
3a
3b
3c
3c

 

With this example, i would count all 'a'jobs, 'b' jobs and 'c' jobs, and then i will need a count of clients who have had 3 or more 'a' jobs. So with the data above, once i put the measure in a card, the count would be 2 clients. 

 

I do not have access to change the model or use power query. I can only do this with DAX funtions. 

thank you for your help 🙂

1 ACCEPTED SOLUTION

Count of Clients with 3 or more 'a' jobs =
CALCULATE(
DISTINCTCOUNT('Table'[Client]),
FILTER(
SUMMARIZE(
'Table',
'Table'[Client],
"Count of 'a' Jobs",
CALCULATE(COUNT('Table'[Job]), 'Table'[Job] = "a")
),
[Count of 'a' Jobs] >= 3
)
)

View solution in original post

4 REPLIES 4
Alef_Ricardo_
Resolver II
Resolver II

Hi TBSST,

You can use the following DAX measure to count the number of clients who have had 3 or more ‘a’ jobs:

Count of Clients with 3 or more 'a' jobs =
CALCULATE(
DISTINCTCOUNT('Table'[Client]),
FILTER(
SUMMARIZE(
'Table',
'Table'[Client],
"Count of 'a' Jobs",
CALCULATE(COUNT('Table'[Job]), 'Table'[Job] = "a")
),
[Count of 'a' Jobs] >= 3
)
)

Legend. Thank you so much 🙂

This measure first uses the SUMMARIZE function to group the data by Client and calculate the count of ‘a’ jobs for each client. Then, it uses the FILTER function to filter the summarized table to only include clients who have had 3 or more ‘a’ jobs. Finally, it uses the DISTINCTCOUNT function to count the number of unique clients in the filtered table.

 

You can then use this measure in a card visual to display the count of clients who have had 3 or more ‘a’ jobs.

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 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.