Forum Discussion
Termenoque
4 years agoFrequent Visitor
Circular Dependancy when creating Relationship
I have various tables with dates and I am able to create relationships on dates to my calendar table all but one of the tables where I presented with a circular dependancy message. I am unable to se...
- 4 years ago
To demo...
exactly the same model...
bcdobbs
4 years agoCommunity Champion
It's worth trying the folowing. When you create the relationship drag from the fact table (many side) into the date table. I think you'll find it works! I know I've had that issue before but now trying in latest version of Power BI I can't recreate the problem at all and it works both ways round.
However I tend to avoid using CALENDARAUTO and go for this sort of approach...
Date =
VAR EarliestYear = YEAR ( MIN ( Purchases[Date] ) )
VAR LatestYear = YEAR ( MAX ( Purchases[Date] ) )
RETURN
ADDCOLUMNS (
CALENDAR (
DATE ( EarliestYear, 1, 1 ),
DATE ( LatestYear, 12, 31 )
),
"Month Year", DATE ( YEAR ( [Date] ), MONTH ( [Date] ), 1 ) //Format as mmm YYYY
)
bcdobbs
4 years agoCommunity Champion
To demo...
exactly the same model...
- Termenoque4 years agoFrequent Visitor
Thanks Ben - that done the trick. Why does it work when switching the direction in creating the relationship as the outcome is the same?
- Syndicate_Admin2 years agoAdministrator
Why does this happen? I have the exact same problem, the tables are not related to each other but it gives me circular dependency