Introduction:
Consider a report which has attributes Day, Region, and Customer. Add a metric that calculates the distinct count of customer. The metric is defined with the expression:
Count<Distinct=True, FactID=>(Customer) {~}.
When the report is executed, the data is as shown below:

The requirement is to have the value for the metric: count distinct customer to be calculated dynamically. In other words, depending on the attributes present on the grid, the count metric should be calculated at that level. For example, if the attribute 'customer' is removed from the grid, the requirement is to get a count of cutomers at the level of Day, Region.
The above metric cannot fulfill this requirement even after adding the required dynamic aggregation function. To get this data, perform the steps provided below:



