Forum Discussion
How to Lookup a Value in Another Table
Hello,
I am trying to lookup the country in BSA00RMMC and return the Balance USD. My Existing table I am creating the Measure in is GL001111.
How can I perform this lookup? The below code does nothing
Balance =
VAR RMMCBALANCE =
MIN ( 'BSA00-RMMC'[Balance USD] )
RETURN
IF (
HASONEVALUE ( 'BSA00-RMMC'[COUNTRY] ),
LOOKUPVALUE (
'BSA00-RMMC'[Balance USD],
'BSA00-RMMC'[COUNTRY], VALUES ( 'BSA00-RMMC'[COUNTRY] ),
'BSA00-RMMC'[Balance USD], RMMCBALANCE
)
)
7 Replies
- Greg_DecklerCommunity Champion
See if my blog article helps:
- lcaseyPost Prodigy
Thanks!
The blog doesnt cover in depth on the Vlookup function---You do have a link to https://msdn.microsoft.com/en-us/library/gg492170.aspx
But I have studied that link and still cant figure out LookupValue. I use Vlookup in Excell every day with no issue but cant grasp the dax language way of doing it.
Basiclly I have 2 Tables
Each table contains many many country records with many duplicates
I simply want to sum up each country Balance from each table and show the Balance from each country
In Excell it is very simple. In fact in my spreadsheets its not a problem doing a vlookup on a pivot table.
But Power BI DAX syntax is written in 50 different ways throughout the Internet making it impossible to understand how to use it at the moment.
- lcaseyPost Prodigy
- perporHelper V
"
See if my blog article helps:
"
thanks, an interesting article, but there is always the problem with the syntax, I must replace often the ',' with ';'
if not I have syntax errors