Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two fields in a table and I have made selections in field one (text) values that have associated values in field 2. When I go, to sum up the values of the fields that I've selected using sum(field) and my total is incorrect.
Example
fields selected in a list box are B,C,D
Table 1
sum(Field2)
Field 1 Field 2
B 5
C 4
D 3
6 = Total
You are probably experiencing an issue caused by the difference between a sum-of-rows and expression total evaluation of your expression in the total line.
This may rise up e.g. with a little more complex data model:
Facts:
LOAD * INLINE [
Dim, Key
A, 1
A, 2
B, 1
C, 2
D, 3
E, 1
E, 2
E, 3
F, 4
];
Numbers:
LOAD * INLINE [
Key, Number
1, 1
2, 2
3, 3
4, 4
];
Then creating a straight table with dimension Dim and two expressions (both = Sum(Number) but with different total mode):
Dim | sum of rows | expression total |
---|---|---|
B | 1 | 1 |
C | 2 | 2 |
A | 3 | 3 |
D | 3 | 3 |
F | 4 | 4 |
E | 6 | 6 |
19 | 10 |
Can you share a screen shot or sample file you have this issue?
I'm sorry this is all I have to offer.
Are there any data modeling issue that could possibly create a situation like this?
use a text object and do sum(Field2) then select values from field 1 and see if the sum totals up?
I cannot say anything unless you show me some screenshots or sample of what your data model is and your chart object you are trying to display your total.
Vishwarath,
Here's an example of what I was looking at, instead of summing to 52 as the example shows the sum total was 39. What would create this type of issue?
John Worth
BI Data Analyst
Upper Lakes Foods
p: 800.879.1265 ext 4278
w: upperlakesfoods.com<http://upperlakesfoods.com/>
This is what i can see when i open your test file and sum is calculated correctly which is 52? Is it somethin else i need to look at?
what would create a sum of 39. I'm not able to replicate this in the example but it came up on test question today. Logically looking at the numbers I would assume that it did not sum the last number 13...but I'm not sure why or what would cause something like this to happen.
John Worth
BI Data Analyst
Upper Lakes Foods
p: 800.879.1265 ext 4278
w: upperlakesfoods.com<http://upperlakesfoods.com/>
Can you screenshot the data model where you have this issue? Not sure why?
Unfortunately, I'm not able to do that, the question is a hypothetical one at best as I do not have access to the all the script data that created the outcome of 39 vs 52.
What I showed you in my example above is what I was given with some multiple choice options in terms of the answer. I'm assuming there must be something in the design, data model, or UI that is creating this issue. The measure was very straightforward.
Thanks for taking a look.