Forum Discussion
aukev
6 years agoHelper III
Avoiding a circular dependency when having a calculated column that references the other table
I have these two tables. Now I've added a calculated column to the Order table (see dax below). The idea is that this is a best estimate of which call belongs to which order. This works fine but now...
- 6 years ago
Now I've undertand.
You have to create a CallID in the two table. For the table Calls, the CallID will be the primary key, and in the Order table the CallID will be the foreing key.
In the Calls table, create a CallID like:
CallID = CONCATENATE(callDate, Customer Phone)
and in the Order table:
CallID = CONCATENATE(dateKey, Phone)
After thar, you can create the relationship.
v-juanli-msft
6 years agoCommunity Support
Hi aukev
You could create columns in "call" table
Column = CALCULATE(SUM('Order'[cost]),FILTER('Order','Order'[dateKey]=calls[callDate]&&'Order'[Phone]=calls[Customer Phone]))
Column 2 = CALCULATE(MIN(calls[historyID]),ALLEXCEPT(calls,calls[callDate],calls[Customer Phone]))
If it doesn't satisfy your requirement, please let me know.
Best Regards
Maggie
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.