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
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
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.