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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
ld17
Helper II
Helper II

Circular Dependency Error

I'm working on a project that required me to cross join two tables ("Names and Job Titles" and "Course List") to form a new table called "Table 2."

 

From there, I created a calculated column called "Completion Date" because I needed all users to be correlated with all training names. This has worked fine, but I am now getting a circular dependency error when I try to create a relationship between Table 2 and Names and Job Titles. How do I fix this?

 

ld17_0-1675791144176.png

 

I need to join Table 2 back to Names and Job Titles because I want the user's name that is located in Table 2 to be joined to their job title and department.

 

The DAX expression I used to join the table is as follows:

Table 2 = CROSSJOIN ( VALUES ('Names and Job Titles'[Associate.title]), VALUES ( 'Course List'[Title]))

And then the calculated measure I used for Completion Date is as follows: 

Completion Date = VAR vResult =

    CONVERT (

        LOOKUPVALUE (

            'In-Classroom Training Log'[Date],

            'In-Classroom Training Log'[Attendee.title], 'Table 2'[Associate.title],

            'In-Classroom Training Log'[Name of Classroom Training.lookupValue], 'Table 2'[Title]

        ),

        STRING

    )

RETURN

    IF ( ISBLANK ( vResult ), "Not Completed", vResult)

 

The result will be a matrix with the department name, job title, and name that looks like the following. Right now, however, I can only get my name column to show up since it isn't allowing me to join Table 2 back to Names and Job Titles, which is where department and job title are located.

 

ld17_1-1675791370759.png

 

After some reasearch, it seems that I need to adjust my calculated measure, but I cannot figure out how to do so, given that I am not a DAX expert.

 

Alternatively, I believe I could cross-join departments and job titles with my names and training titles, and I understand how to do this. However, I cannot figure out how to then get the correct name with the correct department and job title.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ld17 , Change this like

Table 2 = CROSSJOIN ( Distinct ('Names and Job Titles'[Associate.title]), Distinct ( 'Course List'[Title]))

 

and try

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ld17 , Change this like

Table 2 = CROSSJOIN ( Distinct ('Names and Job Titles'[Associate.title]), Distinct ( 'Course List'[Title]))

 

and try

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thank you SO much! That works perfectly.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Top Solution Authors