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: 
Not applicable

How to Shift Trend Line on X-Axis?

Hello,

Is it possible to shift the "Linear Avg" trendline over by 2 data points on the x-axis? Example below where it should start on 16-Jun vs at the beginning?

Beginning the chart at 16-Jun is not an option because the requirement is to begin on Apr.

Thanks in advance!

Line Chart.PNG

-Jason

8 Replies
sunny_talwar

May be try using Above() function

Above(YourExpression, 2)

Not applicable
Author

Doesn't seem to be working with my expression:

sum(TOTAL{1<[Created Year]={'2016'}>} Price)

/

count(TOTAL{1<[Created Year]={'2016'}>} DISTINCT [Created CY-M])

The above gives me a total average which i use to produce the Linear Avg line. Adding in above doesn't shift the line.

sunny_talwar

So this doesn't work for you?

Above(

Sum(TOTAL{1<[Created Year]={'2016'}>} Price)

/

Count(TOTAL{1<[Created Year]={'2016'}>} DISTINCT [Created CY-M]), 2)

If that is not working, would you be able to provide a sample to look at?

Not applicable
Author

No - no change to the trendline after adding in Above

Unfortunately - I can't provide any sample.

sunny_talwar

Oh, I see, its the trendline that you are trying to change and not the actual expression. I guess you will have to recreate the trendline using an expression to get this to work

Not applicable
Author

I had thought of that but with the particular chart style, I can't just add a line. It creates an additional stacked layer on top. Hence, why I tried using a trendline.

sunny_talwar

May be someone else can offer an advice, I am out of ideas .

Not applicable
Author

Thanks Sunny - appreciate the effort!