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.
Hello,
I have a table which contains employeeName, EmployeeID, ManagerName and ManagerID. I wonder if there is a DAX function I can use to check if an EmployeeID correspond to ManagerID and Put a value of 1 is manager or 0 is not.
Regards
Solved! Go to Solution.
Hi @Anonymous ,
try this.
IsManager = IF ( CONTAINS ( 'Table', 'Table'[ManagerID], 'Table'[EmployeeID] ), 1, 0 )
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Hi @Anonymous ,
try this.
IsManager = IF ( CONTAINS ( 'Table', 'Table'[ManagerID], 'Table'[EmployeeID] ), 1, 0 )
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
HI @Anonymous ,
Try creating a new measure
if(isblank(countx(filter(emp,emp[EmployeeID]=earlier(emp[ManagerID])),earlier(emp[ManagerID]))),0,1)
Validate that this not giving 0
countx(filter(emp,emp[EmployeeID]=earlier(emp[ManagerID])),earlier(emp[ManagerID])))
if countx give 0 handle that too.
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
@Anonymous
Create a calculated column as below
= if(table[EmployeeID]=table[ManagerID], 1,0)
You could do this in Query editor as well with custom column.
If this helps mark it as solution
Kudos are nice too
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
96 | |
93 | |
83 | |
70 | |
65 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |