Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum(Sales) vs sum(total sales)

Hi everyone,

Can anyone here explain the difference between sum(sales) vs sum(total sales) with an example?

Many thanks,

Murali

1 Solution

Accepted Solutions
its_anandrjs

Hi,

I explain with an example like:-

ColA, Value

A,    200

B,    300

C,    400

1. so If you take a chart with expression Sum(Value)

Dimension: ColA and

Expression: Value

it will shown

200 , 300 , 400

2. If you create a chart with expression Sum(Total value)

Dimension: ColA and

Expression: Value

it will shown 900 for all values for A,B,C

Thanks & Rgds

View solution in original post

6 Replies
its_anandrjs

Hi,

I explain with an example like:-

ColA, Value

A,    200

B,    300

C,    400

1. so If you take a chart with expression Sum(Value)

Dimension: ColA and

Expression: Value

it will shown

200 , 300 , 400

2. If you create a chart with expression Sum(Total value)

Dimension: ColA and

Expression: Value

it will shown 900 for all values for A,B,C

Thanks & Rgds

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The TOTAL keyword causes the dimensions to be ignored. You can also qualify the total to ignore specific dimensions. If you have a chart/table with dimensions Dim1 and Dim2 then

Sum(Total Sales)     will ignore both dimensions (but will respect any selections you have made)

Sum(Total <Dim2> Sales)          will show the total Sales by Dim1, ignoring Dim2

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks for your help.

Regards,

Murali

Not applicable
Author

Sorry, I think for: "Sum(Total <Dim2> Sales)"   will show the total Sales by Dim2, while ignoring Dim1.

Sales will be returned for each combination of field values in the listed dimension fields.


Not applicable
Author

Hi,

Inline table 1:

A, 50

B, 50

C, 200

sum(sales) will result in the total being sum(sales for A,B,C) which is 300

If you want to do A/(A+B+C), use total.

Not applicable
Author

Hi,

I explain with an example like:-

ColA, Value

A,    200

B,    300

C,    400

1. so If you take a chart with expression Sum(Value)

Dimension: ColA and

Expression: Value

it will shown

200 , 300 , 400

2. If you create a chart with expression Sum(Total value)

Dimension: ColA and

Expression: Value

it will shown 900 for all values for A,B,C

Thanks & Rgds