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
aSystemOverload
New Member

How to avoid Circular Dependency issue with RANKX

I'm getting Circular Depency issues with RANKX.  

 

 

=RANKX(
        FILTER(
                tblProjects,
                tblProjects[SNAPSHOT_DATE_SERIAL]=EARLIER(tblProjects[SNAPSHOT_DATE_SERIAL]) && 
                tblProjects[CompanyID]=EARLIER(tblProjects[CompanyID])  &&
                tblProjects[Project_StatusGroupingB_PrevEOM]=EARLIER(tblProjects[Project_StatusGroupingB_PrevEOM])
                ),
        'tblProjects'[VALUE],
     ,
        DESC,
        SKIP    
    ) 

 

 

 

The only relationship that is referenced is by [Project_StatusGroupingB_PrevEOM], which pulls in a value from a different row on the same table. Is there a better way to structure this RANKX in order to avoid this issue.
Note, it must be a calculated column as I need to sort by it in a multi column Excel Pivot. Also, I don't mind using a different formula like COUNTIF for example that will achieve the same result. I am working with 1000s of rows FYI.

 

The 'tblProjects'[VALUE] was a calculated column, but I've created a measure and referenced that, still getting same errors.

 

Any assistance in re-structuring or creating a different formula would be much appreciated. 🙂

1 REPLY 1
v-ljerr-msft
Employee
Employee

Hi @aSystemOverload,

 

Could you share a dummy pbix file which can reproduce the issue, so that we can better assist on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploadingSmiley Happy

 

Regards

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.