DsAggregate Column Usage Example
The following example, which provides a count of all customers, illustrates how the DsAggregate Column works:
In the example shown above, a Data Table and a DataLayer.Data Services element have been added. A DsAggregate Column element has been added beneath the datalayer and its attributes have been configured so that it will count the number of customer IDs in the data.
The resulting count will be placed in a new column, named "agrCustCount", in every row of the datalayer, and will be accessible as the token @Data.agrCustCount~. Because the value is in every row, it's available for use with every row of data in the table.
Dynamic Application
The DsAggregate Column element has an Include Condition attribute:
If the value of this attribute is left blank or contains a formula that evaluates to True, the element is applied to the Dataview. If the value evaluates to False, the element is ignored and does not affect the Dataview. This powerful feature allows you to dynamically determine if the DsAggregate Column will be added to the Dataview or not.