It would be great if we could perform math functions (like SUM) on columns of data in a Data table.
Marking this request as completed with the experimental release announced in https://powerapps.microsoft.com/en-us/blog/improved-data-table-control-with-column-formulas/. Please reach out with feedback on this improved control behavior.
Any update on this?
I may need a more complete explanation of the experimental tools, but I do not see how any of the new features allow us to sum a column of data in a table.
In my case I use AddColumns to create a new column with a calcualted number of days. Now I need to sum the number of days in each row to give a total number of days.
To help clarify, were you able to do this already with a Gallery control? Or is the request also not supported there.
The improved data table control allows changing a column from binding to a specific field and instead get the value from a formula. At this time you can't add a new column directly but by changing the Text property (only in formula bar) and Header Text property you can make the column indepdendent of that field. In the future we plan to add a direct option to create a custom column (like the Form's custom card). The custom column formula could retrieve an aggregate value from another source to show in the data table.
Based on your reply, this might be re-activated as an open request or I need to clarify how to use the custom column more.
I am able to use AddColumn function to create a new coulmn for the table that is not bound to a field and use a math formula to calculate a value in that column for each row. I am looking for the ability to do a sum of all the values in the new column.
A work around I just came up with today is to use the same filter/add column statement to create a collection and to create the table. I use the sum function to get the total from the collection and the table to dipslay the individual rows to the user. This is not optimal as the powerapp has to query the SharePoint list twice.
I also think this post should not be marked as solved. The original post said, "It would be great if we could perform math functions (like SUM) on columns of data in a Data table". I do not see anything in the experimental release that allows someone to do a SUM on a column of data in a table.