Forum Discussion
Help with a lookup?
- 1 year ago
Hi rmcgrath are you looking for lookupvalue function in dax ?
Column =
VAR Match1 = LOOKUPVALUE('Site Table'[Site], 'Site Table'[Site Lookup], 'First Table'[Dept Loc Code])
VAR Match2 = LOOKUPVALUE('Site Table'[Site], 'Site Table'[Site Lookup], 'First Table'[Department Code])
VAR Match3 = LOOKUPVALUE('Site Table'[Site], 'Site Table'[Site Lookup], 'First Table'[Location Code])RETURN
COALESCE(Match1, Match2, Match3, "No Match") - 1 year ago
Please try to avoid LOOKUPVALUE. If there is a data model, use the data model. If there isn't, use TREATAS. LOOKUPVALUE should be the very last resort.
Hi rmcgrath are you looking for lookupvalue function in dax ?
Column =
VAR Match1 = LOOKUPVALUE('Site Table'[Site], 'Site Table'[Site Lookup], 'First Table'[Dept Loc Code])
VAR Match2 = LOOKUPVALUE('Site Table'[Site], 'Site Table'[Site Lookup], 'First Table'[Department Code])
VAR Match3 = LOOKUPVALUE('Site Table'[Site], 'Site Table'[Site Lookup], 'First Table'[Location Code])
RETURN
COALESCE(Match1, Match2, Match3, "No Match")
- lbendlin1 year agoSuper User
Please try to avoid LOOKUPVALUE. If there is a data model, use the data model. If there isn't, use TREATAS. LOOKUPVALUE should be the very last resort.