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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
slakshmip07
Frequent Visitor

Find count of measure

Hi,

I have a table "Employee". Below is how it looks.

slakshmip07_0-1655608598047.png

 

I have a measure called "RatingStatus" (If an employee has done both self and peer ratings, his status is completed)
RatingStatus= IF(DISTINCTCOUNT('Employee'[RatingType])=2,"Completed","Not Completed")

 

I represented this as a matrix visual which looks like this:

slakshmip07_1-1655608709029.png

 

Now, I want to calculate the count of employees whose status is "Not Completed" for each month.

Eg: Sep-20  2 (2 employees have not completed the ratings)

1 ACCEPTED SOLUTION

Hi,

Write these measures

Measure = DISTINCTCOUNT(Sheet1[RatingType])
NotCompleted = countrows(filter(values(Sheet1[EmpName]),[Measure]=1))

Untitled.png


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

View solution in original post

7 REPLIES 7
slakshmip07
Frequent Visitor

Hi, Sure.
Here is the link. 

Hi,

Write these measures

Measure = DISTINCTCOUNT(Sheet1[RatingType])
NotCompleted = countrows(filter(values(Sheet1[EmpName]),[Measure]=1))

Untitled.png


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

This is exactly what I wanted! Thank you so much Ashish!

You are welcome.


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

Hi,

To a Table visual, drag the TimePeriod column and write this measure

=countrows(filter(values(Data[EmpName]),DISTINCTCOUNT('Employee'[RatingType])<>2))

Hope this helps.


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

Hi Ashish,

It doesn't work. It just displayed the total number of employees, that is, 3 for each month.

slakshmip07_0-1655664752217.png

Do you have any other suggestions on how to proceed?

 

Hi,

Share the download link of your PBI file.


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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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