Forum Discussion
Userelationship to return specific text/value
Anonymous , How is the second measure created?
count from address = calculate(count(Table[From Address]), userelationship(VIP[Address], Table[From Address]))
if you are using not summarized From Address, then that is not a use case for userelationship. you need two dimension tables
amitchandak Thanks! Have not created a measures in this case. Just a log of transactions. In the table I've simply added those fields outlined. Ideally, the customerID column would have no blanks in it, but given the active/inactive relationships they do. Does that make sense?
- amitchandak4 years agoSuper User
Anonymous , You can make inactive as active using a measure only.
Blank can be because of that of missing values in VIP Table
- Anonymous4 years agoNot applicable
amitchandak I think that's what I'm looking for... a measure to populate the customerID column. The customerID column is blank in some places because of the inactive/active relationship. For instance, if you look at the first row customerID 9 is in the VIP table, but yet not populated in the customerID column. Some things I've tried are below:
New Customer ID = //this measurement is needed to address the active/inactive relationship pair in our whales_lookup table to transfers table VAR to_address = CALCULATE( Max(VIP[customerID]), USERELATIONSHIP(VIP[customerID],transactions[to_address]) // this creates a temporary and simultaneous active relationship between whales and to address ) VAR from_address = CALCULATE( Max(VIP[customerID]), USERELATIONSHIP(VIP[customerID],transactions[from_address]) // this creates a temporary and simultaneous active relationship between whales and from address ) RETURN max(to_address, from_address)