Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
JohnnyUtah
Contributor II
Contributor II

Average across groups in a table

Hello,

I'm trying to calculate an average for a group and display it in a column in a straight table. Below is an example of what I'm trying to achieve.

For each Project I want a column to show the average COSTS for all projects with the same  TYPE and Skill. 

PROJECT TYPE SKILL COSTS AVG (FOR TYPE AND SKILL)
PI0018698 SME PROJECT MANAGMENT 7.50 4.26
PI0016494 SME PROJECT MANAGMENT 3.43 4.26
PI0014078 SME PROJECT MANAGMENT 1.83 4.26
PI0019522 SME TECHNOLOGY 1.67 1.67
PI0019522 SME DEVELOPMENT 55.00 16.04
PI0007917 SME DEVELOPMENT 4.17 16.04
PI0018025 SME DEVELOPMENT 2.50 16.04
PI0018541 SME DEVELOPMENT 2.50 16.04
PI0017682 MAJOR BUSINESS PROJECT MANAGMENT 1.25 1.05
PI0016708 MAJOR BUSINESS PROJECT MANAGMENT 1.06 1.05
PI0012608 MAJOR BUSINESS PROJECT MANAGMENT 0.83 1.05
PI0018684 MAJOR BUSINESS DEVELOPMENT 8.38 7.99
PI0012608 MAJOR BUSINESS DEVELOPMENT 8.33 7.99
PI0016782 MAJOR BUSINESS DEVELOPMENT 8.33 7.99
PI0017682 MAJOR BUSINESS DEVELOPMENT 6.92 7.99

 

 I've tried :

=avg(Aggr(Sum([Costs]),[Project], [Type],[Skill])) but that's not giving me the desired result.

Any suggestions would be much appreciated.

Thanks

Labels (1)
1 Solution

Accepted Solutions
MarcoWedel

maybe this expression might work for you as well?

Avg(TOTAL<TYPE,SKILL> COSTS)

 

MarcoWedel_0-1688064042921.png

 

View solution in original post

3 Replies
Chirantha
Support
Support

Hey there,

 

Please try the following expression and see if it helps

=Avg({<[Project]>} Aggr(Sum([Costs]),[Type],[Skill]))

MarcoWedel

maybe this expression might work for you as well?

Avg(TOTAL<TYPE,SKILL> COSTS)

 

MarcoWedel_0-1688064042921.png

 

JohnnyUtah
Contributor II
Contributor II
Author

Thanks Marco. That is the solution.