Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add a second curve to the chart

Hi all,

I am working on some dashboard while one quick questioncomes to me. To simplify it I attach the simple sample:

I load the table Question to the QVD test2. I want to createa chart so that it could always show two curves: one is based on theconstraints I selected, and the other is the average of all curves, which istherefore a constant.

Could anyone tell me how to add the second curve to the charts? Thanks in advance!

Thomas

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Sure,

avg is an aggregation function, so you could add a so called set expression to it (if you don't know what's this, you should start reading in the HELP, or maybe here: http://iqlik.wordpress.com/2010/09/11/the-magic-of-set-analysis-syntax-and-examples/

So, I think we could start with disregarding only the sym field selections, right?

=avg({$<sym= >} vol)

You could read it like: average all vol values in current selection record set, but clear selection in field sym.

So your time selections, or any other selections will still be taken into account.

Hope this helps,

Stefan

View solution in original post

3 Replies
swuehl
MVP
MVP

Hope I got your problem correctly, I think you need something like

=avg({1} vol)

i.e. disregarding all selections, only taken the dimension into account for averaging vol.

Is this what you were looking for?

Regards,

Stefan

Not applicable
Author

Hey Stefan,

Many thanks for your reply. It is very helpful. In reality my situation is a little more complicated. I want the second curve added disregarding some selections but still keep the other. Is there a way to reach that?

Thanks,

Thomas

swuehl
MVP
MVP

Sure,

avg is an aggregation function, so you could add a so called set expression to it (if you don't know what's this, you should start reading in the HELP, or maybe here: http://iqlik.wordpress.com/2010/09/11/the-magic-of-set-analysis-syntax-and-examples/

So, I think we could start with disregarding only the sym field selections, right?

=avg({$<sym= >} vol)

You could read it like: average all vol values in current selection record set, but clear selection in field sym.

So your time selections, or any other selections will still be taken into account.

Hope this helps,

Stefan