Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

total

hello guys ,

what does the TOTAL keyword/function used for in qlikview

thanks

2 Replies
Chanty4u
MVP
MVP

hi,

As best I understand it, ALL means every value in your data set, whether or not it is excluded by your current selections. So if you have five years of data, and have selected a year, and have a chart showing sum(ALL amount) by month, each month will have the same total, which will be the sum of all amounts for the past five years. Note that it is now preferred to use sum({1} amount), which has the same effect.

Total, on the other hand, does take your current selections into account. But it ignores what row you're on in a table. So back to our example, sum(TOTAL amount) would again have the same total for each month, but it would be the sum of all amounts for the selected year.

Here's how QlikView describes it:

"If the word total occurs before an expression, the calculation will be made over all possible values given the current selections, but disregarding the chart dimensions.

The total qualifier may be followed by a list of one or more field names within angle brackets. These field names should be a subset of the chart dimensions. In this case the calculation will be made disregarding all chart dimensions except those listed, i.e. one value will be returned for each combination of field values in the listed dimension fields. Also fields which are not currently a dimension in a chart may be included in the list. This may be useful in the case of group dimensions, where the dimension fields are not fixed. Listing all of the dimensions in the group causes the function to work when the cycle or drill-down level changes.

In previous QlikView versions, the all qualifier may occur before an expression. This is equivalent to using {1} total. In such a case the calculation will be made over all the values of the field in the document, disregarding the chart dimensions and current selections. (The same value is always returned regardless of the logical state in the document.) If the all qualifier is used, a set expression cannot be used, since the all qualifier defines a set by itself. For legacy reasons, the all qualifier will still work in this QlikView version, but may be removed in coming versions."

hope this helps you

suresh chanty