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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Count a result of a Measure

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

 

 

 

 

1 ACCEPTED SOLUTION

You are welcome.  It works absolutely fine.  You were missing a closing bracket after the VALUES() function.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

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.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Thank you!

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

 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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Solution Authors