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
JoWingsGSE
Frequent Visitor

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])
 
Screenshot 2023-11-23 114401.png
1 ACCEPTED SOLUTION
miTutorials
Super User
Super User

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

 

miTutorials_0-1700741928435.png

 

View solution in original post

4 REPLIES 4
JoWingsGSE
Frequent Visitor

I was looking at the wrong column. 

 

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

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!

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.

miTutorials
Super User
Super User

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

 

miTutorials_0-1700741928435.png

 

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.