Forum Discussion
Anonymous
4 years agoNot applicable
Lookup using DAX
Hi All, I have two tables: Cargo and Location Detials (Its a lookup/master table) and below are some sample data Cargo Table:
CargoId Origin Destination
1 01 04
2 0...
- 4 years ago
Anonymous you can use the following measures which works with or without any relationship
_origin = CALCULATE ( MAX ( Location[locationName] ), TREATAS ( VALUES ( Cargo[origin] ), Location[locationID] ) ) _destination = CALCULATE ( MAX ( Location[locationName] ), TREATAS ( VALUES ( Cargo[destination] ), Location[locationID] ) )
smpa01
4 years agoCommunity Champion
Anonymous you can use the following measures which works with or without any relationship
_origin =
CALCULATE (
MAX ( Location[locationName] ),
TREATAS ( VALUES ( Cargo[origin] ), Location[locationID] )
)
_destination =
CALCULATE (
MAX ( Location[locationName] ),
TREATAS ( VALUES ( Cargo[destination] ), Location[locationID] )
)
Anonymous
4 years agoNot applicable
Thanks! @smpa01 your solution worked for me.