Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Can't aggregate alternate states

I everybody,

I'm using the set object state extension to compare prices of objects. I would like to be able to compare more objects at a time but I can only do that with the objects in main state.

For the main state I'm using this expression:

Sum(Aggr(Min(object_cost),object_name))

and it works always, I can select one or more objects and there is no problem.

With the objects in alternate state I use this expression:

Sum(Aggr(Min({Alt}object_cost),{Alt}object_name))


but it doesn't work, it gives me a wrong result.

If I use

Min({Alt}object_cost)



I get the right result, but with this I can only select one object. What should I use to get the right result when selecting more objects in the alternate state?

Thanks a lot for your help and for your attention ,

Best regards

Nicolò Cogno

1 Solution

Accepted Solutions

Re: Can't aggregate alternate states

Try this:

Sum({Alt} Aggr(Min({Alt}object_cost), object_name))

4 Replies

Re: Can't aggregate alternate states

Try this:

Sum({Alt} Aggr(Min({Alt}object_cost), object_name))

Not applicable

Re: Can't aggregate alternate states

Thanks a lot!!! As always it worked!!!

Thanks again

rubandoss786
Contributor

Re: Can't aggregate alternate states

Hi Sunny,

     I couldn't understand the "{Alt}" in the above formula. It would be helpful if u could give explanation regarding how this formula works.

Re: Can't aggregate alternate states

Using the same alternate state in the alternate state just as the alternate state used within the inner aggregation otherwise it will be an intersection of the two states selections

Community Browser