Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi All
This error message has been addressed in multiple posts, but I cannot seem to find a solution for my LOOKUPVALUE problem.
I have two imported tables that I want to use a LOOKUP value DAX formula in.
Table1
Column1 Int64
Table2
Column1 Int64
Column2 text
(taken from the metadata in PowerQuery)
Formula in table1 for a calculated column:
ColName = LOOKUPVALUE(Table2[Column2], Table2[Column1], Table1[Column1], 0)
This brings back the error message, "Expressions that yield variant data-type cannot be used to define calculated columns"
Any idea on how to cast or covert values?
Solved! Go to Solution.
try this
ColName = LOOKUPVALUE ( Table2[Column2], Table2[Column1], Table1[Column1], 0 & "" )
try this
ColName = LOOKUPVALUE ( Table2[Column2], Table2[Column1], Table1[Column1], 0 & "" )
This works. Thank you
Thank you so much! That gives the exact result that I am after! 🙂
Thank you also for the swiftness of your response.
Just out of interest, how does that addition work?
kind regards
Rambler
Hi,
It just converts the datatype of alternate result from a number 0 to text 0 which is consistent with the datatype of Table2[Column2] which you are looking for.
All values in the column must have same data type
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 50 | |
| 47 | |
| 29 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 88 | |
| 76 | |
| 40 | |
| 26 | |
| 26 |