Forum Discussion
Create a table using CROSSJOIN and then create relationship (circular dependency)
Hello,
I need to create a fact table in my model based on 2 dimension tables. I used CROSSJOIN function and create table as below.
The problem is I cannot link it to the source dimension tables now, because it creates circular dependency error. Is there any solution for this?
Thanks, Kamil
Anonymous,
Try using DISTINCT instead of VALUES. Also, make sure dDate is marked as a date table.
https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/
6 Replies
- DataInsightsSuper User
Anonymous,
Try creating the cross join in Power Query:
- AnonymousNot applicable
I can't do this, since one of the tables is calculated table created in DAX.
- DataInsightsSuper User
Anonymous,
Try using DISTINCT instead of VALUES. Also, make sure dDate is marked as a date table.
https://www.sqlbi.com/articles/avoiding-circular-dependency-errors-in-dax/
- v-yanjiang-msftCommunity Support
Hi Anonymous ,
Has your problem been solved by DataInsights's solution?
If so, Would you mind accept his reply as solution? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.
Best Regards,
Community Support Team _ kalyj- AnonymousNot applicable
Thank you for the reminder. Mentioned solution works indeed. Topic can be closed.