Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression for Average Trendlines ?

Hi,

Currently,

We are using Average Trend lines provided by QV and

we are getting below blue Line as Average.

But, Now, we need to use expression instead of Average Trend Line provided by QV.

We are trying to show same thing - same average line but through Expression.

below is our expression for below blue lines.

=Avg({$<[Field] = {XX}>}[Sales])

can someone help us,

how we can achieve and build below average trend lines in blue through expression ?

6 Replies
sunny_talwar

Try this as your expression:

=Avg(TOTAL {$<[Field] = {XX}>}[Sales])

Not applicable
Author

Thanks Sunny.

i had tried.

but, still, it shows sum of Sales for one selected product.

we need to compare sales of one product with average sales of all product.

average sales of all produce in one straight light which is average trend line.

sales of one product is in bar chart.

sunny_talwar

What about this:

=Avg(TOTAL {1<[Field] = {XX}>}[Sales])

this should disregard any selections

or this:

=Avg(TOTAL {$<[Field] = {XX}, Product>}[Sales])

Not applicable
Author

Thanks Sunny.

how about Line ?

How to show that as one straight line shows in example ?

sunny_talwar

TOTAL qualifier should have gotten you a straight line. Would you be able to share few data points to test out?

Not applicable
Author

Thank..

it appears to be working.