Forum Discussion
DAX Function for COUNTIF and/or CALCULATE
- 10 years ago
Hi ksobota,
Based on your scenario, you can use the DAX below on your INDIVIDUAL table.
CountUser = CALCULATE(COUNTA(EMPLOYMENTS[Member_C]),FILTER(ALL(EMPLOYMENTS),EMPLOYMENTS[Member_C]=INDIVIDUAL[User_ID]))
Regards,
Charlie Liao
I have a similiar issue, but this time i want to replicate =COUNTIF($J$2:J2,J2)
So I want the table to count out each of the instances that value is seen. See below example
Kris 1
Kris 2
Kris 3
John 1
Ed 1
Kris 4
Ed 2
Hi there, I'm having this issue as well. Did you manage to solved? Tks
- EILOOP6 years ago
Advocate I
On Page 2 of the thread...
I was able to accomplish this through variables.
For example I wanted to count the times an employee name appeared in my employee name column, since each row is unique to the entire column i stored this value as a var in Formual Bar.
This will work just like a Count If based on the current value of the Row.
Column Name =
var employee_name = Table[Employee Name]
var Outcome = CALCULATE(COUNT(Table[Employee Name]),FILTER(Table,Table[Employee Name]= employee_name))
Return
Outcome