Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Luqlik
Contributor
Contributor

Sum of the individual results is not the same as the overall result

hello all,

I have the sales achieved for each weekday in a week output (fictitious values). I use a table to display the values.

Luqlik_0-1676019046204.png

The top row should actually show the total sum of the individual results for the days of the week shown below. However, if I sum up the individual results, I get a different result.

12,25+15,05+11+21,41666666667+52,1666666667 = 84,88
But the total sum in row "Total values" says 71,08 (which is not as I expected the same as 84,88)

Does somebody have a clue what might be the reason for this weird behaviour?

Thanks a lot!

Labels (1)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

What you have is 1-to-many  (1-n)  relation in your datamodel

one or more of the date values are associated to the same (Cash) value

 

consider below example, Use Dim2 as dimension in table and measure as sum(Value)

Overall sum will be 300 but sum of rows will be 400

 

Sales:

Load * inline [

Dim1,Value

A,100

B,100

C,100

];

Dim:

Load * inline [

Dim1,Dim2

A,Group1

B,Group1

B,Group2

3,Group3

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

2 Replies
jbhappysocks
Creator II
Creator II

Hi

You can select how you want your total to be calculated, in this case you need to change to "Sum" instead of "Auto". Auto will calculate the output based on the formula.

 

Example:

Auto, calculates the formula: 

jbhappysocks_3-1676022954683.png

 

 

Sum:

 

jbhappysocks_2-1676022723550.png

 

 

 

vinieme12
Champion III
Champion III

What you have is 1-to-many  (1-n)  relation in your datamodel

one or more of the date values are associated to the same (Cash) value

 

consider below example, Use Dim2 as dimension in table and measure as sum(Value)

Overall sum will be 300 but sum of rows will be 400

 

Sales:

Load * inline [

Dim1,Value

A,100

B,100

C,100

];

Dim:

Load * inline [

Dim1,Dim2

A,Group1

B,Group1

B,Group2

3,Group3

];

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.