Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
deepakqlikview_123
Specialist
Specialist

Moving Averages in Charts

Hi All,

I need to show moving n year averages for the chart.The years whatever I need to show for moving averages should be given as inputs from input box.As per suggetion from other threads I need to use rangeaverage function for this.

But below is my condition.

If I am showing average for 3 years obviously my average would be in 3rd year in this case I need to show first 2 years blank

(If i have year from 2011 to 2013 then i need to show blank in 2011,2012 and need to show average in 2013.)

Can you please suggest is this possible if possible please help me out.

Thanks

2 Replies
datanibbler
Champion
Champion

Hi deepak,

you could try to somehow count the years in the script - obviously, it would always be like 1,2,3 1,2,3 etc.

Using this, you could define some visibility_conditions on the GUI.

Or is this counting of years dependent on what the user enters in the input_box?

Then you will have to do this counting on the GUI, which is a bit more complicated - unless your user has the Client installed and you can give him a button to run a defined part of the script where that counting is done.

HTH

deepakqlikview_123
Specialist
Specialist
Author

Hi,

Thanks for your input

Can you please share with me an example.

Thanks