title: DAX - How to lookup and return a value from another table based on 2 possible lookups
body: <p>I have 2 tables, one has a ton of fields so I didn't copy it all but the 2 fields in the big table that I'm working with are "Item Number" and "Item Description". The smaller table is pictured below. </p>
  
  <p>ItemData table
  ItemNumber
  ItemDescription
  Entities
  ProductLines</p>
  
  <p>The two tables are not related; I need to have a column in the big table named "Entity" where I lookup the item number or the item description (if the item number is missing) and return what Entity is associated. If both fields are empty then return "NONE".</p>
  
  <p>My current code is below and it works sometimes which doesn't make sense because the code isn't correct, I know.  I also can't get it to look at one field if the other is blank which is why that part of the code has been deleted.</p>
  
  <pre><code>Entity = LOOKUPVALUE(ItemData[Entities],ItemData[Item Number],Page1_1[Item Number],"None")
  </code></pre>
  
  <p>Here is what I want it to say in DAX - Entity = if itemNumber is not null then use item number to retrieve the entity name, otherwise use the itemdescription to find the entity. </p>
  
  <p>Here is what I would like to see:</p>
  
  <p>Item number = "123"</p>
  
  <p>Item Description = "Sunshine"</p>
  
  <p>Entity = "Florida"</p>
  
  <p>I can pull item number and description from the big table. I just need to match those with the small table to get the entity.</p>