Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

LOOKUPVALUE while filtering column

Hi,

 

I need help to lookup value while having the columns filtered.

 

The data table i have is like this:

rowDateEmployee CodeJoin DateResign DateResign ReasonJoin Reason 
11/1/20201231/1/2019   
21/2/20201231/1/201910/2/2020Transfer corporation 
31/2/202012311/2/2020   
41/3/202012311/2/2020   

 

I want to identify the Join reason for employees  to single out employees who are transferred from those new joiners.

 

What i tried to do was to create another column with date & employee code, and another column using PREVIOUSMONTH(Date)&employee code.
Then i use iferror(if(lookupvalue(resign reason, date&employeecode,Previousmonth(date)&employee code)="transfer corporation","Transferred",""),"") to find the resign reason for row 3.

This would typically work when employees resign date was at the last day of the month and the join date was the start of next month, however i got stuck when the join date for row 3 was in the same month as join date for row 2.

I wanted to use
iferror(
if(
or(lookupvalue(resign reason, date& employee code,date&employee code, resign reason, not(blank())),
lookupvalue(resign reason, date& employee code, previous month(date)&employee code)) = "transfer corporation",
"Transferred",""),"")

However it just doesnt work with not(blank()), please advice if there are any other ways.

Thank you.

2 REPLIES 2
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Share sample data and the expected output.

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

amitchandak
Super User
Super User

@Anonymous ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.