I'm currently working on a table component where I need to set up summary rows with calculated fields such as ROAS (Revenue/Spend) and CPC (Clicks/Spend). Could someone please guide me on how to achieve this?
Additionally, I'm facing an issue with text wrapping in both summary rows and heading rows. I need the text to wrap to a second line if it exceeds the width of the cell. Could someone advise on how to implement text wrapping in these scenarios?
To have rows display data that has been calculated by some business logic, I would recommend using a JS Query block or transformer to take the data source of the table, access the data you need and then return the desired result.
With the current tables, I do not believe we have built in functionality for an additional row at the top/bottom that would be a summation of the columns above/below them.
A potential work around would be to have a single row table that you place above/below the main table, with this second table's data source set to be the result of the JS block that summarizes the data/calculates mathematical formulas.
For the text wrapping issue, there is an option to switch the Format to a 'Multi-line String' although this only helps so much. Other than re-sizing the rows to fit more text, the next best workaround is having a tool tip on hover which can display the full text if any gets cut off.