Forum Discussion
shantanu97
6 years agoHelper I
Relationship error in DAX column calculation
Write a DAX column calcluation but I don't know why it is not showing result? I also add the relationship model also. Can anyone help me to fix this issue??
Value USD = SWITCH(RELATED('OLAP Organisation'[BaseCurrency]),
"USD",'OLAP CUBE_Finance_WB'[Amount],
"GBP",'OLAP CUBE_Finance_WB'[Amount]*RELATED('Exchange Rates'[Rate to GBP/USD]),
"AUD",'OLAP CUBE_Finance_WB'[Amount]*RELATED('Exchange Rates'[Rate to AUD/USD])
)
Attach pbix file: https://drive.google.com/file/d/1m1VNHCgCTzEFP9LvK3tsHqeiDHtTRpVo/view?usp=sharing
3 Replies
- Pragati11Super User
Hi shantanu97 ,
I see that you have got a Inactive/Secondary relationship between your OLAP CUBE FINANCE WB and EXCHANGE RATES tables.
In order use them in a DAX together with RELATED function this relationship needs to be an Active/Primary relationship.
Please modify your relationships and try your DAX.
Thanks,
Pragati
- amitchandakSuper User
- v-lili6-msftCommunity Support
hi shantanu97
It seems that RELATED Function could used between a import table and a directquery table, you have to keep them are same storage mode.
Regards,
Lin