Custom column which sums visible columns only?

I have a table which hides/displays columns based on what values the user selects in a multiselectListbox. The hidden/displayed columns are integers only. I want to create a custom column which sums the values of only the displayed fields.

Hey @marwanfarha, welcome to the community :hugs:

Never tried this before but I think you should be able to access the columnVisibility settings of your table and compute only the sum of the visible columns.

So your custom column's value would look something like this:

  (table.columnVisibility.sales == true ? currentRow.sales : 0) +
  (table.columnVisibility.column1 == true ? currentRow.column1 : 0) + 
  (table.columnVisibility.column2 == true ? currentRow.column2 : 0)