Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Userelationship to return specific text/value

Hi there, 

 

Got some great help with a prior post where the foundational issue is very similar. The main difference between the two (I believe) is the desired output here is a Text field whereas prior it was the summation of a value field. To paraphrase from my prior post:

 

I have two tables (attached). One table has a list of VIPs [customerID]'s and the other has a table of customer transactions. I intend to build a "schedule" of transactions based on the day the transaction occured. While it might seem somewhat redundant based on the small test case provided, I'd like to include in the schedule a column for my VIP IDs alongside the date, the to address and the from address.  

 

Since the VIP id # occurs in both to and from fields I've made two relationships in my data model. As expected, when I go to make a table visual the VIP[customerID] is only shown for whatever the active relationship is across the schedule, but shows as blank where the inactive relationship exists. I'd love some guidance on how to get the VIP[customerID] to show up across all transactions only where they occur in the to or from columns (e.g., if neither the to or from contain a VIP I'd like to exclude those from the table visual). Supporting data is below. I've tried primarily IF statements based off max(customerID) paired with userelationships and well as some variable runs to return max of customerIDs in both relationship states, but no success. Any help would be grateful.

 

VIP Table

 

Transaction Table

 

Data Model (link between ID and to/from)

 

Table Visual (with missing customerIDs)

 

4 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      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?

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , You can make inactive as active using a measure only.

        Blank can be because of that of missing values in VIP Table