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

Circular Dependency when calculating Max date column which is a lookup value from another table

Hi!

I am getting a circular dependency error when do a earliest date column based on the Date colimn whihc i brought as a Lookup value from another tab;e. Really appreciate if someone has encountered such issue and have a solution.

 

Table 1                                        Table 2

ID        Date                               Tag         ID          Date(Vlookup from Table 1)     Earliest Date

1        2020-03-02                      A            1           2020-03-02                             Should be - 2020-01-01

2        2019-07-6                        A            3           2020-01-01                             Should Be - 2020-01-01

3        2020-01-01  

 

Following is my logic:

Earliest Date = CALCULATE (
    MINX (
         SUMMARIZE (
            'Table 2',
            'Table 2'[Tag ID],
            "minimumdate", min('Table 2'[Date])
        ),
        [minimumdate]
    )
)
 
Thanks

 

Now I want to create a new column for the Earliest Date in Table 2 Based on Tag ID.

When I try doing so I get a circular dependency error                  

1 ACCEPTED SOLUTION

@Anonymous here is the dax expression to add new column to get the earliest date

 

Earliest Date = CALCULATE ( MIN ( TableDate[Date] ), ALLEXCEPT ( TableDate, TableDate[Tag Id] ) ) 

 

Would appreciate Kudos 🙂 if my solution helped.



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.

View solution in original post

5 REPLIES 5
parry2k
Super User
Super User

@Anonymous in your example dataset there is no column called Tag ID, can you please edit your post and clarify it.



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.

Anonymous
Not applicable

Hi Parry2K!

 

This is what I am expecting to show in the Earliest Date column:Example

Tag ID             ID            Date(This is a Lookup value from Table 1)       Earliest Date Based on TagID(Expected Result)
IPP-18-17       abc123            Blank                                                             2020-10-15
IPP-18-17       abc123       2020-10-31                                                   2020-10-15
IPP-18-17       xyz123        2020-10-25                                                   2020-10-15
IPP-18-17       def345       2020-10-15                                                   2020-10-15
IPP-18-17       abc123      2020-10-17                                                   2020-10-15
IPP-18-17       abc123      2020-11-16                                                   2020-10-15
IPP-18-17      def345        2020-11-12                                                  2020-10-15
IPP-18-17      xyz123        2020-11-09                                                  2020-10-15
IPP-18-17      abc123        2020-11-27                                                  2020-10-15

@Anonymous so I guess you have one to many relationships from table 1, correct? You can use relation function to get the date from table1 instead of using lookupvalue function.



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.

@Anonymous here is the dax expression to add new column to get the earliest date

 

Earliest Date = CALCULATE ( MIN ( TableDate[Date] ), ALLEXCEPT ( TableDate, TableDate[Tag Id] ) ) 

 

Would appreciate Kudos 🙂 if my solution helped.



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.

Anonymous
Not applicable

Sorry about that , the Tag column on the Table 2 is the Tag ID.

Table 1                                        Table 2

ID        Date                               Tag ID         ID          Date(Vlookup from Table 1)     Earliest Date

1        2020-03-02                      A            1           2020-03-02                             Should be - 2020-01-01

2        2019-07-6                        A            3           2020-01-01                             Should Be - 2020-01-01

3        2020-01-01  

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
Top Kudoed Authors