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
decarsul
Helper IV
Helper IV

Rank of callid by customer id as a column

Good day all,

 

Not all to long ago, i had some help with creating a measure to rank workorders by customer. This measure is as follows:

 

 

 

Rank Measure = 
RANKX(
    FILTER(
       ALL('Table'),
       [CustomerId]=MAX('Table'[CustomerId])
    ),
    CALCULATE(MAX('Table'[WorkorderID])),
    ,ASC
)

 

 

 

Now i want to use the same functionality, but instead of a measure, i want it in a column so that i can actually use the value. And with this, i mean a column in the data model and not in a visual. This so i can check if a customer calls more than once, which option in the voice menu they pick first, 2nd, third, etc.

 

How would i do that?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@decarsul , the same one as new column

 

Rank Measure = 
RANKX(
    FILTER(
       ('Table'),
       [CustomerId]=earlier('Table'[CustomerId])
    ),
    'Table'[WorkorderID],
    ,ASC
)

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@decarsul , the same one as new column

 

Rank Measure = 
RANKX(
    FILTER(
       ('Table'),
       [CustomerId]=earlier('Table'[CustomerId])
    ),
    'Table'[WorkorderID],
    ,ASC
)

Sneaky, thats not the same one, that code's been editted. but that works. Thanks!

If it were only that simple . . . 

When i do that, i get an error message. got to translate it from dutch, but it says something like: 'A circulair dependancy has been detected 'table' rank measure', 'table' rank measure','table' rank measure'

Helpful resources

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