cancel
Showing results for 
Search instead for 
Did you mean: 
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
)
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

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
)
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

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
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors