Forum Discussion
Lookupvalue equivalent to search for text values
Hi DAXers,
I am wondering is there a way to search for a text string in DAX and return a value like with LOOKUPVALUE? I believe I can not use LOOKUPVALUE because ir requires a scalar search value. Looking for something like LOOKUPTEXT.
Thanks.
6 Replies
- gvg
Post Prodigy
How does that work? Assume I have two tables:
Table1 Table2
Product name Amount Product name Discount
A 100 A 10%
B 200 B 12%
LOOKUPVALUE(Table1[Amount],Table1[Product name],Table2[Product name]) doesn't work for me complaining that the third argument needs to be scalar value. I need to write something like LOOKUPVALUE(Table1[Amount],Table1[Product name],MAX(Table2[Product name]) ), but this doesn't work either because Product name is not numeric field. Am I loosing something here?