Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
sbianco
Regular Visitor

Help Lookupvalue text

Hi,

I need help with this scenario

I have A sheet called "examples" that contains a column called last_discoverer_hostname linked with another sheet called "manged" that contains two columns: "hostname" and "machine_domain". My scope is to associate the machine_domain at the l"ast_discoverer_hostname". I have performed the following query Discoverer Domain = LOOKUPVALUE(examples[last_discoverer_hostname],Manged[machine_domain],0), but I have the following error: "Function 'LOOKUPVALUE' does not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.".
Someone, could you kindly help me?

Regards

Sly

1 ACCEPTED SOLUTION
audreygerred
Super User
Super User

This is saying that one of the two values you are comparing is text and the other is integer. When comparing the two values they data type needs to be the same. If the text value is an int, but being displayed as a string you could do the following: LOOKUPVALUE(Table[Column], Table[TextColumn], VALUE(OtherTable[IntegerColumn]))

VALUE function (DAX) - DAX | Microsoft Learn

 

You could also convert the int to text and compare that way:

LOOKUPVALUE(Table[Column], Table[TextColumn], FORMAT(OtherTable[IntegerColumn], "0"))

FORMAT function (DAX) - DAX | Microsoft Learn

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
audreygerred
Super User
Super User

This is saying that one of the two values you are comparing is text and the other is integer. When comparing the two values they data type needs to be the same. If the text value is an int, but being displayed as a string you could do the following: LOOKUPVALUE(Table[Column], Table[TextColumn], VALUE(OtherTable[IntegerColumn]))

VALUE function (DAX) - DAX | Microsoft Learn

 

You could also convert the int to text and compare that way:

LOOKUPVALUE(Table[Column], Table[TextColumn], FORMAT(OtherTable[IntegerColumn], "0"))

FORMAT function (DAX) - DAX | Microsoft Learn

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi,

 

Thanks, it's working

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.