Forum Discussion

Kipple123's avatar
Kipple123
Frequent Visitor
7 years ago
Solved

Adding Customer Order Number Column

I'm working with a table that has unique Customer ID's and Order IDs, but has one row per item in a given order.  I'm trying to add a calculated column to the table that will tell me whether the row ...
  • Kipple123's avatar
    7 years ago

    I was able to solve this problem after I learned about the "earlier" function.  Here's the code that worked 

    Rank = RANKX(FILTER(Sales,Sales[customerId]=EARLIER(Sales[customerId])),Sales[order_date],,ASC,Dense)