Flat Form - Aggregate Values

Answered
Mark Mandell asked on May 2, 2024

Our users love the pivotting aspect of FlexMonster, but they have also requested aggregate functions in the Flat Form view.

In our example, we have a dataset with a huge list of Areas, Vendors and Trucks that work for us.  We'd like to be able to show (in Flat Form), the Area, Vendor and Count of Trucks.  This is obviously easy in Compact or Classic view, but our users would like to see all of the data in Flat Form.

Thanks,
Mark

 

 

 

3 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster May 7, 2024

Hello, Mark!

Thank you for reaching out to us.

Kindly note that the flat table does not allow the records to be grouped by the same field members, similar to the classic or compact layouts. Technically, the count of a string value can be displayed on a flat layout as a calculated measure, as shown in this example: https://jsfiddle.net/flexmonster/sk6gq74c/. Since each row is an individual record, having a count of 1, such a configuration would only be useful for the display of the total count. 

In case you would like to group the records and show a count of trucks per certain area and vendor, we recommend modifying the classic layout to look similar to a flat table is possible by expanding all data, disabling the subtotals, and applying the customizeCell function.  By specifying the expandAll option as true, it is possible to expand all data, showing all existing cell members similarly to the flat view. Subtotals should be hidden by the showTotals options set as "off" to hide the subtotals of a higher hierarchy level above the lower level. In addition, the customizeCell function can be used to populate the empty cells with a corresponding caption. The resulting view will look similar to a flat view using the built-in Flexmonster capacities for aggregations. We have prepared an example with a classic view modified to look similar to flat: https://jsfiddle.net/flexmonster/rsdzofhp/ 

Please let us know which solution would work for you.

Best Regards,
Maksym

Public
Mark Mandell May 8, 2024

Hi Maksym,

Your example works perfectly!  We're now going to use the classic layout for any reports we want to look flat but with aggregates, and I'm including the function that was in your sample for copying cell values.

Thanks,

Mark

Public
Maksym Diachenko Maksym Diachenko Flexmonster May 9, 2024

Hello, Mark!

Thank you for your reply.
We are glad to hear that the proposed solution with a classic view works for you.
Feel free to contact us if more questions arise.

Best Regards,
Maksym

Please login or Register to Submit Answer