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
sandy8910
Frequent Visitor

Counting the specific result from another measure

Hi Everyone,

 

I am very new to Power BI. I have the following:

 

1. Employee Full Name (From Emp table)

2. Employee Earned amount (From Emp table)

3. Employee Task completed  (From Emp table)

4. Total Earned amount (Measure:= Sum(Employee Earned amount))

5. Total Task completed (Measure:= Sum(Employee Task completed))

6. Earned amount per task (Measure: = Divide(Total Earned amount,Total Task Completed))

 

Now I need a measure that should give me the count of Employees who earned more than $2 per WOID.

 

Issure is when I try to use CountX or Calculated Function, It does not let me refernce the original table (I need to refer to orignial table because I want a count of Full names of Employees from table and $2 value from measure table) 

Can anyone help?

 

 

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @sandy8910 ,

 

Try something like this:

_empsEarnedOver2USD =
CALCULATE(
  COUNT(empTable[Employee Full Name]),
  FILTER(
    empTable,
    [Total Earned Amount] > 2,
  )
)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
BA_Pete
Super User
Super User

Hi @sandy8910 ,

 

Try something like this:

_empsEarnedOver2USD =
CALCULATE(
  COUNT(empTable[Employee Full Name]),
  FILTER(
    empTable,
    [Total Earned Amount] > 2,
  )
)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thanks BA_Pete for quick response,

 

Below funcation from parry2k in another thread has helped me get the answer

 

COUNTX ( VALUES ( Table[Date column] ), IF ( [Your Measure] < 3, 1 ) )

 

@sandy8910 ,

 

No problem, glad it's sorted.

 

Please accept your answer as the solution if you feel that it would help others with the same issue.

This helps others find the answer to their issues quicker.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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.