Forum Discussion
NoobAnalyst01
Helper I
8 years agoReturn value from another table with one to many relationship within those two tables
Hello, I have two tables with the relationship below and sample data as below: in the ASEET TABLE, for example, how can I added an column the get the value for "region" from ASSET_ATT...
- 8 years ago
Hi NoobAnalyst01,
To achieve your requirement, please try following method, see if it works for you:
DOMICILE = CALCULATE ( MAX ( ASSET_ATTRIBUTE[VALUE] ), FILTER ( ASSET_ATTRIBUTE, ASSET_ATTRIBUTE[TYPE] = "REGION" && ASSET_ATTRIBUTE[ASSET_ID] = ASSET[ASSET_ID] ) )Thanks,
Xi Jin. - 8 years ago
Hi Jin,
Thanks,
this works for me.
the only question i have is why in my filter statement, i should include a asset_id=attrtibute_value.
becaue in my relationship, i alredy join those two tables together 1:m relationship.
but when I remove the a asset_id=attrtibute_value in my formula, it doen't work, just wonder is there any reason why we should include this?
Thanks
Frank
Zubair_Muhammad
Community Champion
8 years agoNoobAnalyst01
Helper I
8 years agowill try.