Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there geniuses,
I have a measure that indicates "yes" or "no" if a salesperson has achieved their target for the month.
Now I would like to count the number of salespeople that have achieved their target.
I have tried every type of count and calculate but I am not able to get it working. Can you please help?
Cheers
Phil
Solved! Go to Solution.
You are welcome. It works absolutely fine. You were missing a closing bracket after the VALUES() function.
Hope this helps.
Hi,
If Yes, No are results of a measure and not a calculated column, then try this
=COUNTROWS(FILTER(VALUES(Data[Salesperson]),[Target Met]="Yes"))
Hope this helps.
If the result is not as per your expectation, then please share the link from where i can download your PBI file.
Hi Ashish
That did not work, but many thanks for getting back to me, my sample file is here:
https://drive.google.com/file/d/1U40FNZJVQ8ZszTPYxtOBJwVr3jnDrnns/view?usp=sharing
Cheers
You are welcome. It works absolutely fine. You were missing a closing bracket after the VALUES() function.
Hope this helps.
Thank you!
You are welcome.
Hi @Ashish_Mathur,
this is a great fix.
I wondered if you can help me tune the formula.
For me, it counts correctly, and when I enter the two measure into a table "yes" and "no", the sum in the table based on slicers is correct.
When using the "yes" & "no" in a card. The slicers i have on column 'a' for example do not impact the count.
The card results in the total counts of "yes" & "no".
Does this make sense?
Cheers
Thank you. I am not clear with your question. Share some data and show the expected result.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |