Forum Discussion
Circular dependency was detected
Ok, I understand your requirement.
If you need to create a second date table with the periods you cannot refer to the first calender table.
Something like this might work for you.
Table 2 =
var _vCalendar = CALENDAR(MIN(tbl[Target Date]), MAX(tbl[Target Date]))
var _35 =
ADDCOLUMNS(
FILTER(_vCalendar, DATEDIFF([Date], UTCTODAY(), DAY) >35),
"Period", "35+ Days"
)
var _60 =
ADDCOLUMNS(
FILTER(_vCalendar, DATEDIFF([Date], UTCTODAY(), DAY) >60),
"Period", "60+ Days"
)
var _90 =
ADDCOLUMNS(
FILTER(_vCalendar, DATEDIFF([Date], UTCTODAY(), DAY) >90),
"Period", "90+ Days"
)
RETURN
UNION(_35,_60,_90)
Just mimic the code in your calendar table in the _vCalendar variable. This should allow for the relationship to be built between the two date tables.
Thanks for the response,
Here we forgot one more thing, we will be having duplicate records in Calendar table as well. Now I cant have relation for Calendar and my Fact table.
Even if relation happens Cardinality will be many to many.
- jgeddes2 years agoSuper User
My response was not clear. I intend for you to have both a calendar table and a period table proposed in my last response. The period table would filter the calendar table which would then filter your fact table.
- KSumanth2 years agoFrequent Visitor
Thanks for the response, The provided solution is not working.