Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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.
Client | Job |
1 | a |
1 | a |
1 | a |
1 | b |
1 | b |
1 | c |
2 | a |
2 | a |
2 | b |
2 | c |
3 | a |
3 | b |
3 | c |
3 | c |
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 🙂
Solved! Go to 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
)
)
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.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |