How do I perform an aggregation by summing one column and dividing it by the distinct count of another column?
When working with Bold BI dashboards, there may be a need to apply custom aggregations that are not directly supported by default configurations. One such scenario is calculating the sum of one column divided by the distinct count of another column. This article provides a step-by-step guide to achieve this using an expression.
Steps to Apply Custom Aggregation
-
Identify the Columns:
- Determine the column for which you need to calculate the sum (let’s call this
Column1
). - Identify the column for which you need the distinct count (let’s call this
Column2
).
- Determine the column for which you need to calculate the sum (let’s call this
-
Create the Expression:
-
The required calculation is
Sum(Column1) / DistinctCount(Column2)
.
-
-
Configure the Expression in the Widget:
-
Access the assign data section of widget and add the expression to it.
-
Additional References
For more detailed information on configuring expressions and custom aggregations in dashboards, refer to the following resources:
By following these steps, you can effectively apply custom aggregations in your dashboards to meet specific analytical requirements.