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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
sjpaq
Helper I
Helper I

Calculated column using inactive relationship

I have 2 calculated columns in a table that use an inactive relationship to a date dimension table. The first column works fine and the second column gives a circular reference error.

First Column

Breach Rpt Date = CALCULATE(
    Min('cda datedim'[Date]),USERELATIONSHIP('cda breach'[Breach Reporting Date],'cda datedim'[DateId]
    ))
This returns the correct value, a date 
Second Column
Breach Rpt Fiscal Year = CALCULATE(
    Min('cda datedim'[FiscalYear]),USERELATIONSHIP('cda breach'[Breach Reporting Date],'cda datedim'[DateId]
    )) 
The 2 expressions are identical except that the column selected (highlighted in red) in each is different. Why does the second give a circular reference error as in:
sjpaq_0-1675093169221.png

 Thanks in advance

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @sjpaq,

Perhaps you can try to directly extract the current table value as conditional to filter and get the correspond table records to stored into the variable.

Then you can and manually use this in the formulas without USERELATIONSHIP function. (I think the issue should related to USERELATIONSHIP function and it may generate the temp relationship mappings for the calculations)

Understanding circular dependencies in DAX - SQLBI
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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