I’d like to assign a rank to a date field, that is partitioned by customer name. The goal is to understand what item(s) customers purchase the first time they ship with us. So I’d like to identify their first purchase with an invoice date, and then see what item they bought.
I tried to write a calculated field using the rank function but am getting an error. Anyone have any good ideas? Thanks so much!
This is my initial code:
rank(InvoiceDate DESC], [customerName])
Hi @kmcen - how are you intending to use the rank after you compute it? Do you want to display it in your visual, if so, how? Or are you just trying to fliter to the first date per customer?
Using a similar formula:
rank([{order date} ASC], [{contact id}])
I can put that into a pivot table and rank each per contact (and can filter =1 too):