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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Error in Create Relationship : A circular dependency was detected

Hi All, 


I created a DATE in PoweBI and other data table(directQuery to database). If I try to create a relationship, it is throwing an error. Screenshot attached -

sgajjar_1-1647379070189.png

 

 

Can anyone help me to understand what am I doing wrong here? I am fairly new to PowerBI. I have tried to create a relationship with normal excel uploaded file as well but it is still giving me an error. Here is the query for date table I have used - 

 

DATES = 
VAR BaseCalendar = 
    CALENDARAUTO ( 6 )
RETURN
    GENERATE (
        BaseCalendar,
        VAR BASEDATE = [Date]
        VAR YEARDATE = YEAR (BASEDATE)
        VAR MONTHNUMBER = MONTH (BASEDATE)
        RETURN ROW (
            "DAY", BASEDATE,
            "YEAR", YEARDATE,
            "Quarter", "Q" & FORMAT( BaseDate, "Q"),
            "MONTH NUMBER", MONTHNUMBER,
            "Month", FORMAT ( BaseDate, "mmmm" ),
            "Month Short", FORMAT( BaseDate, "mmm"),
            "Year Month", FORMAT( BaseDate, "mmmm" ),
            "Year Month Short", FORMAT( BaseDate, "yyyy/mmm" ),
            "Year Quarter", FORMAT( BaseDate, "yyyy") & "/Q" & FORMAT( BaseDate, "Q"),
            "Weekday", FORMAT( BaseDate, "dddd"),
            "Week Short", FORMAT( BaseDate, "ddd"),
            "WEEK NUMBER", WEEKNUM (BASEDATE),
            "Year Month Sort", FORMAT([date], "YYYYMM")
        )
    )

 

I would really appreaciate if anyone can help. 

 

Thanks,
Sapna

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try to use calendar with dates in place of calendarauto and try

 

DAX Calendar - Standard Calendar, Non-Standard Calendar, 4-4-4 Calendar
https://www.youtube.com/watch?v=IsfCMzjKTQ0&t=145s

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors