Forum Discussion
rafarother
5 years agoFrequent Visitor
Repurchase counter
Hello guys, this is my first post and I need help. I have a huge database with the columns: day, state, costumer code, SKU, origin, state and month. I need to count how many times a costumer ...
amitchandak
5 years agoSuper User
rafarother , Output you want is not clear. Please check last post how to provide the information.
I think you need day rank. Try if this can work
rankx(filter(db, [Costumer Code] = earlier([Costumer Code]) && [Month] && earlier([Month])), db[Day],,asc,dense)
rafarother
5 years agoFrequent Visitor
I want something like that:
But yes, I think i need a rank.
I can do it that way:
count_purchase =
COUNTROWS(FILTER(db, db[Customer Code] = EARLIER(db[Customer Code]) && db[Month] = EARLIER(db[Month]) && db[Day] <= EARLIER(db[Day])))
This works, but in a small database. In the huge database (21000000 lines), said I don´t have enough memory. (My work notebook have only 4GB RAM. Sad 😕 )