Forum Discussion

JoWingsGSE's avatar
JoWingsGSE
Frequent Visitor
2 years ago
Solved

LOOKUPVALUE ERROR - driving me slightly mad

Hello!

 

I am going mad here. Data set contains collection address and delivery address on the same line.  Countries are coded by name and I have successfully created a Collection Country Name column using LOOKUPVALUE, but when following the same process for the Delivery Country I am getting the following error: lookupvalue does not support comparing values of type integer with values of type text. consider using the VALUE or FORMAT function to convert one of the values

 

Attached a screenshot to demonstrate.

 

Formula used for Collection Country: 

LOOKUPVALUE(CountryCode[Name],CountryCode[Id], 'Collection & Delivery Addresses'[Collection Country ID])
 
Formula used for Delivery Country: 
LOOKUPVALUE(CountryCode[Name],CountryCode[Id], 'Collection & Delivery Addresses'[Delivery Country ID])
 
  • It looks like the data type of Delivery Country ID column is Text. Change that to Number from your Query editor..

     

     

4 Replies

  • It looks like the data type of Delivery Country ID column is Text. Change that to Number from your Query editor..

     

     

  • JoWingsGSE's avatar
    JoWingsGSE
    Frequent Visitor

    Thank you for the quick response. I have triple checked and the text columns are text columns, the numerical ones are numbers. 

     

    I am stumped!

    • miTutorials's avatar
      miTutorials
      Icon for Super User rankSuper User

      The Delivery Country ID values are aligned to Left and this happens when the data type of that column in not a Number. Whereas the Collection Country ID numbers are alighed to right which is the case when the data type is Number.

  • JoWingsGSE's avatar
    JoWingsGSE
    Frequent Visitor

    I was looking at the wrong column. 

     

    You have fixed it - thank you so, so much!!