Forum Discussion
need help identifying customers first, 2nd and so on orders
- Anonymous5 years ago
Hi Anonymous
Try "Dense" in Rank function. I update your code.
New calculated column:
New Rank = RANKX(FILTER(Fact_table,Fact_table[business_partner_code]=EARLIER(Fact_table[business_partner_code])),Fact_table[demand_date_id],,ASC,Dense)Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous
Try "Dense" in Rank function. I update your code.
New calculated column:
New Rank =
RANKX(FILTER(Fact_table,Fact_table[business_partner_code]=EARLIER(Fact_table[business_partner_code])),Fact_table[demand_date_id],,ASC,Dense)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Its showing this error while I am running this query can you please help me to resolve this?
Error : EARLIER/EARLIEST refers to an earlier row context which doesn't exist.
I am trying to find the customers 1st, 2nd, 3rd and so on.. purchases, in front of each order I wanted to write that which number'th of order it is for that particular customer.
Please help me with the solution.