Forum Discussion
Unknown_1
2 years agoFrequent Visitor
Need help on Lookupvalue dax
Hi Team, I have a dataset of 3 columns a s stated in the picture attached. I want to do a simple vlookup of the second column in the entire range and want to return the result(Third co...
- 2 years ago
Yes, blank rows will also cause that issue with LOOKUPVALUE.
You can try something like...Calculated Column 2 = var _vTable = SUMMARIZE( 'Table', 'Table'[Column1], "_value", SUM('Table'[Column3]) ) var _result = SUMX( Filter(_vTable, [Column2] = [Column1]), [_value] ) Return _resultLet me know how that works.
Unknown_1
2 years agoFrequent Visitor
I have cross checked the dataset there is only 1 matching value present in column 2 which is appearing in column 1. However there are a blank row. Is that causing the problem?
Also is there any other way in which I can solve this problem?
jgeddes
2 years agoSuper User
Yes, blank rows will also cause that issue with LOOKUPVALUE.
You can try something like...
Calculated Column 2 =
var _vTable =
SUMMARIZE(
'Table',
'Table'[Column1],
"_value", SUM('Table'[Column3])
)
var _result =
SUMX(
Filter(_vTable, [Column2] = [Column1]),
[_value]
)
Return
_result
Let me know how that works.
- Unknown_12 years agoFrequent Visitor
Thanks it worked!