Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
KamilSzpyrka
Helper III
Helper III

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.

KamilSzpyrka_0-1653564866864.png

 

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?

KamilSzpyrka_1-1653564933342.png

 

Thanks, Kamil

 

1 ACCEPTED SOLUTION

@KamilSzpyrka,

 

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/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
v-yanjiang-msft
Community Support
Community Support

Hi @KamilSzpyrka ,

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

Thank you for the reminder. Mentioned solution works indeed. Topic can be closed. 

DataInsights
Super User
Super User

@KamilSzpyrka,

 

Try creating the cross join in Power Query:

 

https://docs.microsoft.com/en-us/power-query/cross-join 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I can't do this, since one of the tables is calculated table created in DAX.

@KamilSzpyrka,

 

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/ 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




It works indeed, thank you for your help.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.