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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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