Forum Discussion

fabiomanniti's avatar
fabiomanniti
Icon for Helper III rankHelper III
4 years ago

Manage indirect relationship: DAX USERELATIONSHIP

I have these tables:

  • Orders
iduser_idwallet_id
  • Users
idnamewallet_id
  • Wallet
idbalance

 

I can make a relationship between Users and Wallet and Orders and Wallet but when I try to make a relationship between Orders and Users I get a message there already is a indirect relationship.

I would like to put on a visual this:

Order (id)user (name)wallet (balance)

but I cannot get a connection between Order and user so I'm using DAX

USERELATIONSHIP(Orders[user_id], Users[id])

but I know this doesn't simply work. I must put this inside another DAX.
I tried 

CALCULATE(MAX(name), USERELATIONSHIP(Orders[user_id], Users[id]))

but I only get one name with Z (the last on alphabetic order).

Can anyone help me?