Forums

Full Version: Aggregation using SDK Methods in Dashboard Designer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How does aggregation works using SDK methods in Dashboard Designer?
(06-17-2019, 09:09 AM)noopur.mehrotra Wrote: [ -> ]How does aggregation works using SDK methods in Dashboard Designer?

Through Dashboard designer, you can do aggregation using two methods.

 
1.  The first case is when you want a single aggregated value result. Use the following SDK method:

         var aggrData = sdk.getAggregatedDataSet(changedItem.attributes.data , "SUM");
           sdk.setValue("label2", aggrData.Revenue);

 
Note: 'Revenue' in this method is one of the field sets. You just need to replace the value with the desired fieldset/column, you want to aggregate. Field set value is case sensitive while using in SDK methods. So please use in the same case as it is showing in the field set. You can use SUM, AVG, MAX, MIN and COUNT.

2.  The second case is when you want the array of aggregated values by any dimension/category. Use the following SDK method:

         sdk.applyAggregation('column1' , 'Year' , 'Revenue' , 'SUM');