Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Userelationship, sumx with calculate dax

Dear Friends , i have two table(PR_PO table and Currency Rate table and related with many to one: CurPR(PR_PO table) and Currency(Currency Rate). i calculate:

PR amount in US$ by measures:     

PR Amount US$ = SUMX(PR_PO,PR_PO[PR amount]*RELATED('Currency Rate'[Exchange Rate(US$)]))
its ok
but whenever i tried to calculate PO amount in US$ by measures:
 
PO Amount US$ = CALCULATE(SUMX(PR_PO,PR_PO[PO amount]* RELATED('Currency Rate'[Exchange Rate(US$)])), USERELATIONSHIP('Currency Rate'[Currency],PR_PO[CurPO]))
 
gives the error like: USERELATIONSHIP function can only use the two columns references participating in relationship.

 How can resolve this error

Remember: i need by Measures only not by Calculated Column        

 

 

Thanks, Jia

  • USERELATIONSHIP needs the relationship to already exist. Do you have an inactive relationship between 'Currency Rate'[Currency] and 'PR_PO'[CurPO]?

1 Reply

  • USERELATIONSHIP needs the relationship to already exist. Do you have an inactive relationship between 'Currency Rate'[Currency] and 'PR_PO'[CurPO]?