Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
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.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
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