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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
Super User
Super User

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.