8 Replies Latest reply: Apr 29, 2010 3:12 PM by John Witherspoon

Set Analysis

Is there any way that you can use set analyses in an expression without using any formulas? I need to use a set analysis in an expression but would like to avoid editing the script if at all possible.

• Set Analysis

I don't know what you mean by "formulas" in this context, but a set analysis expression can be as simple as something like this:

sum({1} Amount)

I believe set analysis IS restricted to being used with aggregation functions, such as sum().

You do not use set analysis in the script. You use it in objects in the application.

• Set Analysis

In the example below I would like to make the dollar amount for Account # 102000 represent the same amount each time. I'm pretty new to this, used set analysis successfully a few times but do not know how to change a value. Thanks in advance.

 Account Amount 100000 ##### 101000 ##### 102000 ##### 102001 #####

• Set Analysis

Mmmm, there are lots of ways for it to be the SAME amount, including obviously incorrect approaches like hardcoding a 1 for your column value. So what amount do you want? The absolute total amount for each account code for the entire data set, no matter what anyone selects? Coincidentally, that would be the example expression I posted:

sum({1} Amount)

• Set Analysis

I would just like to make account # 102000 to always have \$33.00 as its amount, regardless of any other selections. Could easily just transfer it to excel and change it everytime, but thought that maybe there was an easy way for me to do it on Qlikview.

 Account Amount 100000 ##### 101000 ##### 102000 \$33.00 102001 #####

• Set Analysis

OK, so is \$33.00 a hardcoded value, completely unrelated to the ACTUAL amount in the Amount field? Anyway, if you want to hardcode an override, and don't want to do it in the script or in your data source, you could do it in the chart like this:

if(Account='102000',33,sum(Amount))

But you'd have to do it in EVERY place you use the field, where with a script solution, you'd only have to do it in one place. But I'm guessing this has something to do with your other question about changing values, in which case my best guess at this point is the one I used there, that you probably want to make the Amount an input field, and then input \$33 in it. I'm not sure, though.

• Set Analysis

That worked perfeclty, thank you for your help.

• Set Analysis

How do I mark this question as answered on the forum?

• Set Analysis

I don't recall. Is it something under the "more" drop down for the answer?