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

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.

Reply
RvdHeijden
Post Prodigy
Post Prodigy

LookUp function ?

I now have a table with unique names, the number of times that person called in sick and the total sickdays of that person all in 1 table.

Some people arent employed with us anymore so i want to look if someone is stille employed but that data is in another table.

So basically i want to search a name in a different table and get the value in a certain column and then get it back in my original table

 

in excel it would be vert.zoeken or a lookup function but what is it in DAX ?

1 ACCEPTED SOLUTION

Sorry for not being clear. The table in my previous reply was an example of a lookup table that would return an error.

 

From the MSDN website, about the behaviour of LOOKUPVALUE in case of duplicates:

"If multiple rows match the search values and in all cases result_column values are identical then that value is returned. However, if result_column returns different values an error is returned."

 

In other words, you are trying to answer the question whether Jan is employed. LOOKUPVALUE will work fine if it finds the same answer twice, but will return an error if finds two different answers.

 

So, the main issue is you have ambiguity in your real data, and the first question is how you want to handle this ambiguity.

 

A business rule to solve this issue could be the following: employee X must be considered employed as long as there is no record in Verzuimloop where Employed = 0.

 

In that case, you could filter Verzuimloop accordingly and check that LOOKUPVALUE returns BLANK.

View solution in original post

13 REPLIES 13

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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