Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
suthashiniv
Contributor
Contributor

Calculatin data in a group excluding NA data

Hi,

I am collating the data i have collected into a bar chart whereby i would need to create 3 groups to compare the difference per year. The data i collected are similar to how it is below:

     

DepartmentQ1Q2Q3
Dept 110105
Dept 21055
Dept 31055
Dept 410NA5
Average1055

Each group consists of tables of data whereby some data could be stated as NA. Where the data is NA the final average should be calculated excluding the average, for example, for Q2, the average should be 6.66 and not 5 as the NA value should be excluded and the total sum should be divided by 3 instead.

So currently,since i have 3 group, how I'm deriving to this value is by AVG(AGGR(AVG({[Group 3]}Data),Faculty, Questions,Year))

As i want to exclude data which is NA, i need to include something like Data-='NA', but how do i do it as this is the data from a group. in this scenario, the group name is Group 3.


Please help. Thanks.

4 Replies
sunny_talwar

Is group an alternate state here?

suthashiniv
Contributor
Contributor
Author

Hi, yes. Group is an alternate state

sunny_talwar

Does this help:

=Avg({[Group 3]<Data -= {'NA'}>} Aggr(Avg({[Group 3]<Data -= {'NA'}>}Data), Faculty, Questions,Year))

suthashiniv
Contributor
Contributor
Author

No....it returns the same result.  thanks