cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ohraytyroo
Helper I
Helper I

count of staff not Audited

Hi!

 

I have 2 tables Employee and Audits

Relationship one to many from Emp to Audits

 

I wanted to count the Employees that are not yet audited.

I was able to achieve this by using a calculated column in Employee that returns true when Emp is not on audits table i used lookup value and count from there.

 

Is there a way to do this just by using measure and not using calculated columns?

 

Thanks in advance!!

1 ACCEPTED SOLUTION
jaideepnema
Solution Specialist
Solution Specialist

Hi @ohraytyroo ,

Create two measures like this:

 

For counting total audits:

Audit Count = CALCULATE(COUNTX(Audit,COUNT(Audit[Employee ID])))
 
For counting staff not audited:
Staff Not Audited = CALCULATE(COUNTX(FILTER(Employee,ISBLANK([Audit Count])),COUNT(Employee[Employee ID])))

 

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

View solution in original post

3 REPLIES 3
jaideepnema
Solution Specialist
Solution Specialist

Hi @ohraytyroo ,

Create two measures like this:

 

For counting total audits:

Audit Count = CALCULATE(COUNTX(Audit,COUNT(Audit[Employee ID])))
 
For counting staff not audited:
Staff Not Audited = CALCULATE(COUNTX(FILTER(Employee,ISBLANK([Audit Count])),COUNT(Employee[Employee ID])))

 

Please accept this as a solution if your question has been answered !!

Appreciate a Kudos 😀

View solution in original post

HI @jaideepnema 

 

Yeah it worked!

 

Thank you!

i have a follow up question tho. 
is it still needed to wrap them with Calculate?
i tried without calculate and they both still worked.

ya ya... you can also create these measures without calculate also 😀

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors