Forum Discussion
Syndicate_Admin
4 years agoAdministrator
Generate consecutive calculated column from scratch
Good morning community. Today I ask for help with a calculated column for a table, where I have a customer (ID_CLIENTE) that can be repeated several times and different sales dates (FECHA_VENTA), I ...
- Anonymous4 years ago
Try this code to build a calculated column. You can use Earilier function to catch current row.
CONSECUTIVE = RANKX(FILTER('Table','Table'[ID_CLIENTE] = EARLIER('Table'[ID_CLIENTE])),'Table'[FECHA_VENTA],,ASC,Dense)-1Result is as below.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickl
Syndicate_Admin
4 years agoAdministrator
Thank you very much for your prompt response!
Could you help me but as a calculated column? Thank you very much in advance.
Anonymous
4 years agoNot applicable
Try this code to build a calculated column. You can use Earilier function to catch current row.
CONSECUTIVE =
RANKX(FILTER('Table','Table'[ID_CLIENTE] = EARLIER('Table'[ID_CLIENTE])),'Table'[FECHA_VENTA],,ASC,Dense)-1
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 quickl
- Syndicate_Admin1 year agoAdministrator
Thank you very much for example! It helped me to solve this challenge... greetings from Guatemala. 🤓