Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
timmy
Partner - Contributor III
Partner - Contributor III

QlikView 12 Alternate states + variables + aggregation function

Hi All,

Note: If is speak about an application, I speak about an QV application

I have a small issue with an application when I open this application in 12.1.

I made an example application to explain my issue in more detail (see attachment).

First a few facts that are important to know:

  1. In the application I have a variable that contains a simple if + match function.
  2. I also have an aggregation function that uses the outcome of the variable as an aggregation level (for a dynamic use of this aggregation function)
  3. I also use this function in different/alternate states.

My issue is as follows:

When I use the application in the 12.1 version, I need to make a small change in my variable. I need to delete the '=' sign because an old bug in the 11.2 version is now fixed in the 12.1 version. Deleting the '=' sign will give me the possibility to use the variable in different states now.

The issue start popping up when I use my aggregation function with the variable as dynamic aggregation level.

  1. When I use this expression/calculation in a textbox (with changing the alternate states as needed), the formula works.
  2. When I use the calculation in a chart expression, is doesn't work anymore.

If I go back to the 11.2 QV version and add the '=' sign again, it suddenly works again .

My question:

Is this normal behavior or a bug in the 12.1 version?

Kind Regards

Timmy

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this expression in your chart: =Aggr(nodistinct Sum(Expression1),$(=$(vAggrLevel)))

Then get rid of that expression and use this one instead: Sum(total <$(=$(vAggrLevel))> Expression1)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try this expression in your chart: =Aggr(nodistinct Sum(Expression1),$(=$(vAggrLevel)))

Then get rid of that expression and use this one instead: Sum(total <$(=$(vAggrLevel))> Expression1)


talk is cheap, supply exceeds demand
timmy
Partner - Contributor III
Partner - Contributor III
Author

Hi Gysbert,

Thanks for the fast reply. Can you also give me an explanation why we should use $(=$(variable)) in the 12.1 version instead of $(=variable) in the 11.2?

Kind Regards

Timmy