hello I am trying to calculate the variations in the states of a person I know this by putting 1 when the client is active 0 when he is inactive I need to identify in which period the client went from being inactive to being active and from active to inactive.
THIS IS MY TABLE
This is the result I would like to get
Are the negative signs in your “result” screenshot necessary?
Hello @Jalvear ,
here is a workflow I have prepared.
Tell me if it works for you!
Have a nice day,
Hello @lelloba thank you very much for wanting to help me with my problem, your solution does what I need, however I think it is a good solution when you have a small number of clients, in my case I have more than 100,000 and the time it takes is quite a bit, even I keep running it to see how much the total is. Thank you very much for the help.
@elsamuel It is not necessary, simply the negative identifies me that a client went from inactive to active
Glad it helped
Later I can try to change it a little bit to make it more efficient.
Is it slow because of the loop
You could try unpivoting with rule engine
I borrowed @lelloba work (thanks for that appreciate it!)
I have updated my workflow too See the previous link
Have a nice evening,
Hello, thank you very much for the solutions, very elegant by the way, I appreciate you taking the time to help me and teach me a new way of doing it. It is all I needed now if I can continue, I reiterate again thank you both very much for such good solutions.