This example emulates the standard Percent of Total window calculation behavior in the calculated field's expression.
You cannot include the window functions in a calculated field directly. To support window functions inside a calculated field expression, use the w-Function.
This example contains the calculated field with the following expression:
ToDouble(Sum([Sales])) / w(Total(Sum([Sales])), partitionBy(), orderBy())
The second part of this expression uses the w-Function with the embedded window function (Total
in this example) to calculate the total Sales summary for the entire aggregated data collection. The current row summary is divided by this total to obtain the percentage. In addition, the Percent formatting is applied.
- Window Calculations
- w Function - Window Calculations at the Intermediate Aggregation Level
- Calculated Field
- Dashboard for WinForms - How to Use the W Function to Show Top N Products by Category
- Dashboard for WinForms - How to display best and worst monthly sales for each year
- Dashboard for WinForms - How to Calculate the Contribution of Quarterly Sales to Total Yearly Sales
- Dashboard for WinForms - How to evaluate a customer acquisition using the quarter/year of their first purchase
- Dashboard for WinForms - How to divide customers' count by the number of orders they made
- Dashboard for WinForms - How to calculate Highest Product Sales by Year
- Dashboard for WinForms - How to display sales by years in comparison with the previous year's sales
- Dashboard for WinForms - How to Display Product Sales that are Greater than $20k
- Dashboard for WinForms - How to Display Products with Sales Greater than Average Sales per Category
(you will be redirected to DevExpress.com to submit your response)