Is it possible within Appian to effectively insert aggregated rows.

Hi All,
We're looking to expand the use of Reports within Appian, however I'm looking to confirm if it's possible to effectively do row level calculations on the datasubset.

Eg imagine you have a P&L report which contains a grid with columns (month, year to date, vs last year, vs budget)

And Rows 4 rows of P&L summary lines (eg sales, discounts, cost of sales, profits)

Is it possible within Appian to effectively insert aggregated rows. Eg Row 1 =Sales, 2 =Discounts, 3 =net sales, 4 = 1-2- cost of sales = margin, 5= profit

The calcs aren't important, just the principle of cdt manipulation and not just appending a "total row" on.

Thanks

OriginalPostID-178750

OriginalPostID-178750

  Discussion posts and replies are publicly visible

  • Hello Chris, Assuming that you are trying to use a paging grid, I see only one possibility that being "creating a formatted cdt" with all the calculations prior to inputting it to the grid. Since there is no special ability built in to the grids to tell the columns to use a "formula" that works on other columns data for example. I worked on a similar use-case that aggregates data from processes and database and then shows final results on grid, here the grid only acts as a data render-er and does nothing special. On the other hand, implementing the same feature using an editable grid takes another approach. For this, I might not need any formatted cdt, as I can do all the calculations inside "row layout", which would have all the required data fields inputted to it, so I can write whatever formula for each cell inside THAT ROW itself. But for this we have to compromise built-in pagination. I might have misinterpreted your question but let me know you need any more information.
  • Hi, I don't think you have misinterpreted. The only caveat is it must not rely on doing anything 'in process' as I looking to avoid related actions etc. In this circumstance pagination would not be required so an editable grid solution would be fine. If you have any examples to get me going which do something similar that would be great! If not, I've got another approach to look into (which somehow I'd managed to completely overlook! Thanks.
  • Hi, I don't have any examples with me right now but I'm pretty sure you can write logic on your own as you have understood the strategy. What is that another approach you are thinking of ? Is it a database view that calculates data ? This is also a fine approach if your requirement supports creating a view...
  • +1
    Certified Lead Developer
    forum.appian.com/.../SAIL_Recipes.html

    Here's a basic example of an inline grid that includes a calculated column value. Should help point you in the right direction
  • Thanks, I found that yesterday and did a mock up.. This isn't high up my list of things to look at but I suspect it will be easier to change the underlying source rather than inserting rows into CDTs on the fly and making calculations on render. I'd need to be inserting a calc row mid CDT, and also the bottom etc.