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

Ignoring running selection on running dimension in Aggr

Hi everyone, I'm currently struggling with a problem for which I really need your collective wisdom.

Here is the situation: I have a data model which includes an aggr function. The aggr function runs over a particular dimension, on which the user has made selections. Thing is, I want to ignore the selection and calculate over all possible values of the dimension.

I've reduced the problem to this simple example, in which the aggr looks like:   "=sum( total aggr(1, A)"

Without selection on A, the results look like we want them:

A.PNG

But when I select values in A, it only runs over those values instead of over all:

B.PNG

In both the textbox and the table, I still want the values to read 5. I've tried a lot of combinations using set analysis, but can't get it to work.

I'm including the example above.

4 Replies
sunny_talwar

May be try this:

=Count({1}TOTAL A)

sunny_talwar

And this for text box object

='Total sum: ' & Count({1}A) & '

(should be 5)'

Not applicable
Author

Hi Sunny,

You are right, for this simplified example this would work.

Unfortunately, our real-life situation is a bit more complex and the equation looks something like this:

=firstsortedvalue(name, aggr(sum(value), name))

We haven't figured out a way to do this without the aggr.

Thanks!

sunny_talwar

May be try this:

FirstSortedValue({1} name, Aggr(Sum({1} value), name))