Articles in this section
Category / Section

How do I Calculating Average of Unique Items Per Employee in a Data Source

Published:

In some cases, you may need to calculate the average of unique items per employee from a data source. This can be achieved by using expressions and widgets in your dashboard. Here’s how to do it:

Step 1: Create Expressions

First, you need to create two expressions. One for counting the number of employees and another for calculating the average of items based on the employee count.

  • Expression for Count: COUNTD([employee])
  • Expression for Average: SUM([item])/[employeeCount]
    image.png

Step 2: Add a Combo Box Widget

Next, add a combo box widget to your dashboard. This widget will be used to filter based on the passed date values and the average. Assign the pivot grid and card widgets as its listeners.

image.png

Step 3: Use Card and Pivot Grid Widgets

The card widget will display the average items based on the employee count for a specific date, while the pivot grid widgets will show the employee and their total items purchased on that date.

image.png

Note: This expression can be supported by any data source that stores numerical data and allows mathematical operations, such as databases (like MS SQL, Oracle, PostgreSQL).

References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
RM
Written by Reethika Moovendhan
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied