Forum Discussion
LOOKUPVALUE does not find data that does exist
Hello
Does anyone know why I only find a line when there are really more coincidences?
Measure:
Between these two tables there is a non-active relationship
Hi Syndicate_Admin
There are reasons for returning blanks when using lookupvalue function:-
No Matching Value:
- If there is no row in the table that matches the provided search conditions,
LOOKUPVALUEwill return a blank.
- If there is no row in the table that matches the provided search conditions,
-
Multiple Matching Values:
- If there are multiple rows that match the search conditions,
LOOKUPVALUEwill also return a blank to indicate ambiguity.
- If there are multiple rows that match the search conditions,
-
Missing or Blank Values in the Lookup Column:
- If the column being looked up contains blanks or is missing for the matching rows,
LOOKUPVALUEwill return a blank.
- If the column being looked up contains blanks or is missing for the matching rows,
For more assistance :
please share a pbix or some dummy data that keeps the raw data structure with expected results. It should help us clarify your scenario and test the coding formula.
How to Get Your Question Answered Quickly
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
-
6 Replies
- rajendraongole1Super User
Hi Syndicate_Admin - I hope there is an inactive relationship between the tables, create a below measure
Contact Name =
CALCULATE(
LOOKUPVALUE(
Contactos_sql[Name],
Contactos_sql[No_], Sales_Header_sql[Sell-to Contact No_]
),
USERELATIONSHIP(Contactos_sql[No_], Sales_Header_sql[Sell-to Contact No_])
)Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!- Syndicate_AdminAdministrator
With the measure you comment I get the following error:
It is true that in the contacts table there are no repetitions but in the Sales header table there are
- Ritaf1983Super User
Hi Syndicate_Admin
There are reasons for returning blanks when using lookupvalue function:-
No Matching Value:
- If there is no row in the table that matches the provided search conditions,
LOOKUPVALUEwill return a blank.
- If there is no row in the table that matches the provided search conditions,
-
Multiple Matching Values:
- If there are multiple rows that match the search conditions,
LOOKUPVALUEwill also return a blank to indicate ambiguity.
- If there are multiple rows that match the search conditions,
-
Missing or Blank Values in the Lookup Column:
- If the column being looked up contains blanks or is missing for the matching rows,
LOOKUPVALUEwill return a blank.
- If the column being looked up contains blanks or is missing for the matching rows,
For more assistance :
please share a pbix or some dummy data that keeps the raw data structure with expected results. It should help us clarify your scenario and test the coding formula.
How to Get Your Question Answered Quickly
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- Syndicate_AdminAdministrator
The problem then is that there are multiple coinciding values. Is there a way for anyone I find to indicate it (even if there are several)?
- AnonymousNot applicable
Hi apenaranda
Can you show some sample data of two tables in the table format? You say there are multiple coinciding values, do you mean one No_ value may have multiple Name values in the Contactos_sql table? Additionally, what is the cross-filter direction of the inactive relationship?
Best Regards,
Jing
-