Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Disregarding dimension but not selection in expressions

Hi guys,

I just wanted to know if there was any way I could disregard dimension but not disregard selection in an expression.. Any ideas?

Regards

Faisal

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

If I've understood what you want, you do it like this:

sum(total Sales)

The "total" keyword tells QlikView to disregard all dimension values.  If you need to include some but not all of the dimensions, you list the dimensions you want to include:

sum(total <Year, Customer> Sales)

View solution in original post

6 Replies
hallquist_nate
Partner - Creator III
Partner - Creator III

In your set analysis expression, have your tried using "Field.name="?  That is what I do when I want do ignore a field.  You should be alble to use $ to accomodate selections, then the above expression ignore the field.

Let us know if that meets your needs.

johnw
Champion III
Champion III

If I've understood what you want, you do it like this:

sum(total Sales)

The "total" keyword tells QlikView to disregard all dimension values.  If you need to include some but not all of the dimensions, you list the dimensions you want to include:

sum(total <Year, Customer> Sales)

Not applicable
Author

Thanks. Yeah it works. Surprisingly this wasnt in the reference mannual. Whats even more suprising is that i couldnt even find a discussion on it.

Not applicable
Author

Do you mean something like < max( {$field.name} sales) >  ?

hallquist_nate
Partner - Creator III
Partner - Creator III

John has the simplest answer.  I totally forgot about that...

Good call.

johnw
Champion III
Champion III

faisalza wrote:

...Surprisingly this wasnt in the reference mannual...

It looks like it's mentioned under each aggregation function that can use "total", with a reasonably-complete explanation under the first listed aggregation function, "sum".

"sum ( [set_expression] [ distinct ] [ total [<fld {, fld}>]] expression )

...

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."