-
-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to perform conditional accumulation in the table? #1166
Comments
Thank you for the reply, but sorry, I still don't understand. Your suggestion was to use logical judgments to handle this, which I understand, but my understanding is that you were referring to an addition operation within one row, without providing a way to perform vertical operations across rows. What I had in mind was there should be a filter and a variable representing all values in a certain column up to the current row, which would enable this conditional cumulative addition, like sum(filter(ColumnValuesUntilCurPosition(), condition)). Perhaps I misunderstood your meaning? |
I don't think it's even possible to implement order-depended variables, as order in Teable is tied to view. I can work around this with "Previous" field: |
I got you. Frankly, formula does not support such case. |
Thank you for your workaround; it's a viable solution for now. I had tried using Rollup before but failed because I was unaware that the "link to another table" field could link back to itself. As you mentioned, indeed, the order is tied to the view, which poses a problem but also serves as a feature. This way, I can achieve different accumulative sums with different orders in various views, which is quite common in many business data analysis scenarios. I've used this feature in other similar products like Lurke. Thank you once again for your workaround method. |
For example, I have two columns:
a b
0 1
1 2
0 4
1 6
1 8
I want column C to show the cumulative sum of column B up to the current row, excluding rows where column A equals 1.
The text was updated successfully, but these errors were encountered: