Button to delete all row except first row

Is there a formula to delete all rows except first row.

I tried runaction(deleterows([Table].filter(currentvalue.first().not())))

but i got an error.

please help

good luck @Korn_Tris

Not in my computer atm to double-check, but you can try this within the filter formula: CurrentValue!=Table.first()

4 Likes

very elegant, this works even better, no need for a helper column.

1 Like

When building this kind of row-level editing functionality, I’ll often start by adding a button column to the table, where the button performs the operation only on its own row - deleterows() in this case. It makes it a lot easier to test an operation without affecting your entire dataset.

Then when you’re happy with the formula, you can either copy it to a canvas button or just use the canvas button to push the column buttons.