Forum Discussion

Vashko's avatar
Vashko
Frequent Visitor
2 years ago

Relationship between columns and rows

Hello all,

 

I have a problem with how to create a relationship between two columns and values within them:

Example:

From | To | AmountOwed
David | Mike | 4
Mike | David | 10

so basicaly Mike should pay 6, if you get what what I mean, any ideas on how to execute this?

2 Replies

  • Since we have no further Information about your model....

    You can try to get your result by using other dimensions in your model, e.g. debit, credit etc. hope you get the idea.

    Or you can create a key (concat) which matches your "from" and "to" values.

    hard to say since there are no further insights for your model 

    • Vashko's avatar
      Vashko
      Frequent Visitor

      Hello there,

       

      thank you for the answer, well this is the only one table with multiple rows which are populated in a same manner as shown