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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
db042190
Post Prodigy
Post Prodigy

circular reference trying to add a rank column

Hi, is the problem below due to the fact that i have no "primary key"?    The table is the the result of a python script and while python might have a way of generating such a thing, i'm not sure how to tell dax it exists anyway.  I'm trying to generate a sequential number that begins at maybe 1 every time a new ticker is encountered , and then because i know date is unique within ticker, I provided it as an order by column.

 

circularreference.png

1 ACCEPTED SOLUTION

this seems to work.  

 

Rank = RANKX(FILTER('data','data'[Ticker]=EARLIER('data'[Ticker])),'data'[Date],,ASC,DENSE)

View solution in original post

3 REPLIES 3
db042190
Post Prodigy
Post Prodigy

i only have a calculated measure (no calc'd columns) coded as shown below.    It gets the last close.   

 

i tried reading that same article before posting here and got lost.  I just reread it and could possibly apply what that author is saying in a calculate function but i have a rank which as far as i can tell cant change context.  Can someone pls help.

 

Latest Close = CALCULATE (
    MAX ( 'data'[Close] ),
    FILTER (
        ALLEXCEPT ( 'data', 'data'[Ticker] ),
        'data'[Date] = MAX ( 'data'[Date] )
    )
)
 
 

this seems to work.  

 

Rank = RANKX(FILTER('data','data'[Ticker]=EARLIER('data'[Ticker])),'data'[Date],,ASC,DENSE)
DOLEARY85
Resident Rockstar
Resident Rockstar

Hi,

 

Do you have any other calculated columns? If so this post should help understand why it happens and how to resolve it: https://community.fabric.microsoft.com/t5/Community-Blog/Circular-Dependency-between-Calculated-Colu...

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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