Summary

An expression is composed of an aggregation (Sum, Count, Avg, Min, Max, ..) and a field → example: Sum(Sales) means the sum of the sales.

It's possible to add optional elements: Identifiers and Modifiers. (Documentation: Identifiers documentationModifiers documentation)

The syntax for the optional elements is: {identifiers<modifiers>} → example: Sum({$<Year={2018}>}Sales) means the sum of the sales 2018 for the current selection.

Several examples of use

  • Sum({<Year={2018},Country={'France'}>}Sales) : sum of sales 2018 for France
  • Sum({<Year={">2016"}>}Sales) : sum of sales since 2016
  • Sum({<Country-={'France'}>}Sales) : sum of sales of all countries except France
  • Sum({<Year={2016,2018},Country={'France','Belgium'}>}Sales) : sum of sales 2016 and 2018 for France and Belgium
  • Sum(Sales)/Sum(TOTAL Sales) : percentage of sales
  • No labels