Forum Discussion
RichardLinderma
Helper I
1 year agoHow to create a calculated measure using columns from two different tables without a relationship
I'm trying to create a calculated measure that combines both the Origin and Destination points of travel. The two columns are Origin[city_name] and Destination[city_name], and I want the new measure ...
- Anonymous1 year ago
Hi RichardLinderma ,
I create two tables and they have no relationships.
Then I create a measure and I think you can try on this DAX code.
Measure = VAR _OriginCity = MAX ( 'Origin'[city_name] ) VAR _DestinationCity = CALCULATE ( VALUES ( 'Destination'[city_name] ), 'Destination'[city_id] = MAX ( 'Origin'[city_id] ) ) RETURN _OriginCity & "/" & _DestinationCityBest Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
1 year agoHi,
Share some data to work with and show the expected result. Share data in a format that can be pasted in an MS Excel file.