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
Simone2004
Helper I
Helper I

A circular dependency was detected: myTable[myColumn].

Hi everyone,

I have two tables in my model and I should visualize data from both. Two tables have a relationship 0..1-1 in sql server but in power bi the relationship is generated as 1...Many... 

 

The result I expect is really simple: 

I must visualize the creation date of a request, and the payment date if the request has been sold.

Simone2004_0-1624220109475.png

I am trying to solve the problem step by step. I let you see... This is my model:

Simone2004_1-1624220271628.png

First thing I have done is created a new column on payments fact table:

 

payment_date = RELATED('registry dimension_time (2)'[date])

 

Everything is ok... Now in my requests fact table I create a new column:

 

payment_date =
    CALCULATE
    (
        SELECTEDVALUE('payments fact'[payment_date]),
        NATURALLEFTOUTERJOIN('requests fact','payments fact')
    )

 

Or

 

payment_date =
    CALCULATE
    (
        SELECTEDVALUE('payments fact'[payment_date]),
        USERELATIONSHIP('requests fact'[request_id],'payments fact'[request_id])
    )

 

In both cases I getthe error:

 

A circular dependency was detected: requests fact[payment_date].

 

If I replace the column with a measure, it seems it works but I get strange results (see the first image in this post).

 

Any help please? Is more than 5 days I am trying to solve this problem... 😞

 

Thank you

3 REPLIES 3
parry2k
Super User
Super User

@Simone2004 you can manually change it to 1 to 1 if you know it will never be 1 to many and then everything is super simple.

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Simone2004 I think you are overcomplicating it. Does one request can have only 1 or 0 payments, or it can have more than 1 payment as well? If the answer is more than one payment can happen then what payment date would you like to for that request, most recent or the first payment date?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

no no... a  request can have only 1 or 0 payments.. I don't know why power bi create a 1-Many relationship

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.