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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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