Posted 22 December 2024, 3:16 pm EST - Updated 22 December 2024, 11:19 pm EST
Fields Q1, Q2, Q3, Q4 and Q5 each have 2 data values greater than zero.
Fields Q6 and Q7 each have 1 data value greater than zero.
All fields have a filter to show all data values except zero.
All fields have aggregate set to average.
All fields have format set to n2.
The average is correct for each field when including Q1, Q2, Q3, Q4 and Q5 in the Values area of the pivot panel.
Observed incorrect behavior: The average for Q3, Q4 and Q5 becomes incorrect when including Q6 or Q7 in the Values area of the pivot panel.
Expected behavior: The average for Q3, Q4 and Q5 should not change and become incorrect if including Q6 or Q7 in the Values area of the pivot panel.
See attached screenshots and jsfiddle
https://jsfiddle.net/xcy321h0/
Data:
let data = ;
//1
data.push({
Q1: 0,
Q2: 0,
Q3: 0,
Q4: 0,
Q5: 0,
Q6: 0,
Q7: 0
});
//2
data.push({
Q1: 0,
Q2: 0,
Q3: 0,
Q4: 0,
Q5: 0,
Q6: 0,
Q7: 0
});
//3
data.push({
Q1: 4,
Q2: 5,
Q3: 4,
Q4: 4,
Q5: 4,
Q6: 5,
Q7: 5
});
//4
data.push({
Q1: 0,
Q2: 0,
Q3: 0,
Q4: 0,
Q5: 0,
Q6: 0,
Q7: 0
});
//5
data.push({
Q1: 4,
Q2: 5,
Q3: 5,
Q4: 5,
Q5: 5,
Q6: 0,
Q7: 0
});
//6
data.push({
Q1: 0,
Q2: 0,
Q3: 0,
Q4: 0,
Q5: 0,
Q6: 0,
Q7: 0
});
//7
data.push({
Q1: 0,
Q2: 0,
Q3: 0,
Q4: 0,
Q5: 0,
Q6: 0,
Q7: 0
});