Skip to content

DevExpress-Examples/winforms-dashboard-w-function-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Files to look at:

Dashboard for WinForms - How to Use the W Function to Show Top N Products by Category

This example demonstrates how to show the products with top N sales by category.

The dashboard contains calculated fields with the following expressions:

Field Expression
ProductRankInCategory aggr(w(RankDense(Sum([ProductSales]), 'desc'), PartitionBy([CategoryName]), OrderBy()), [CategoryName], [ProductName])

The grid shows the products with the ProductRankInCategory value that is more or equal to the parameter value (default value is 2).

Grid rows in the Top Products and OTHERS are sorted by the TopNProductsSortOrder calculated field for proper arrangement.

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

This example demonstrates how to show the products with top N sales by category.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •