Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I am importing 2 excel sheets. I have one that lists all active employee's, the other one lists employee's with borrowed items.
Is there a DAX function I can use to run (Active employee's against employee's with borrowed items)
The result will be terminated employee's as anyone without a borrowed item is no longer working for this company.
Hi @aishak12 ,
Have a look at this post, I think this is what you're looking for.
https://community.powerbi.com/t5/Desktop/Compare-2-columns-from-2-different-sheets/td-p/318659
Cheers,
Maurice
@aishak12 Yes, you can use EXCEPT for this purpose, so something like:
Table =
VAR __ActiveEmployees = SELECTCOLUMNS('Sheet1',"Employee",[Employee])
VAR __BorrowingEmployees = SELECTCOLUMNS('Sheet2',"Employee",[Employee])
RETURN
EXCEPT(__ActiveEmployees,__BorrowingEmployees)
You could use the LOOKUPVALUE() function, which will allow you to look up values in one table against another. Then you could use the ISBLANK() function to see if you returned anything. I'd need data though to show you an example.
Ideally you could do this in Power Query with a merge. That is where I would try to do this as modeling there typically works better than in the DAX side, which is best for analysis.
But in any case, I'd need some data @aishak12
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingQuery 1 (Excel sheet 1) = EmployeesList
Column name = Username
Query 2 (Excel Sheet 2) = redbeam
Column name = Username
Could you help me write a function that compares username for both sheets.
hi @aishak12
Above solution should all work for your case,
Table =
VAR __ActiveEmployees = SELECTCOLUMNS('EmployeesList','EmployeesList'[Employee])
VAR __BorrowingEmployees = SELECTCOLUMNS('redbeam','redbeam',[Employee])
RETURN
EXCEPT(__ActiveEmployees,__BorrowingEmployees)
https://docs.microsoft.com/en-us/dax/except-function-dax
IF not your case, What is your expected output?
Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Regards,
Lin
What do you mean "compares" @aishak12 ?
Be very clear what you are trying to accomplish. "compare" is very generic.
Can you provide actual data too, not screen shots. Don't make us key stuff in. 😁
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingJoin the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
85 | |
42 | |
30 | |
27 | |
27 |