Forum Discussion
DAX Function for COUNTIF and/or CALCULATE
- 9 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
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
- Anonymous4 years agoNot applicable
Hi v-caliao-msft ,
I am facing a smiliar issue while replicating COUNTIF of excel in DAX and i saw your solution however when i applied the same DAX i am not getting the table name from which i need to compare my value :
Please see below screenshot of my dax where i am trying to get counts the number of times a SF ID appears in the Sheet 1 table if it matches the Taleo Req ID of each row in "Referral Tracker":
Request you to please help.
Regards,
Ashish
- zuuu2 years agoNew Member
Hi,
I'm new to Power BI. I have been trying to figure if there is a way to use the formula var.p (to calculate variance) in order to calculate variance of approved quantity for each unique item code out of the 300 unique item codes in total. The items were repeated but I have already grouped them into just the unique values in a new table along with their count values to the no'of time they have occured. All other data remains in the main sheet. Now, I need to figure how to calculate variance of the approved quantities for each item code.
Any suggestions would be much appreciated:)
Thank you