5 Replies Latest reply on Sep 5, 2018 10:59 AM by Byungkeun Song

# How can I draw exact trendline that Tableau offer for the extraction of the slope data ?

Hello,

I am trying to plot an exact trendline that Tableau desktop offer cause I want to extract the slope data.

Knowing that I can copy and paste those data through "describe trendline", I would like to draw line automatically affected by the change of data.

I tried and saw some discussion like Covariance, Trend Lines, Correlation Coefficient R and R-Squared / Calculation of slope of trend line  etc.

However, I have not figured out how to draw it yet.

Attached a tableau workbook file for modification, could you please help me out to draw the trendline?

Thanks,

ps)I put the picture of the trendline

• ###### 1. Re: How can I draw exact trendline that Tableau offer for the extraction of the slope data ?

To get LS

Least squares - Wikipedia

Thanks,

Shin

2 of 2 people found this helpful
• ###### 2. Re: How can I draw exact trendline that Tableau offer for the extraction of the slope data ?

Just following up.

If the post helped, please mark my answer as correct / helped to close the thread, not from inbox but from original post.

Thanks,

Shin

• ###### 3. Re: How can I draw exact trendline that Tableau offer for the extraction of the slope data ?

Thanks, Shin

Clear answer and helped me a lot

Since I am a new on Tableau, 2 further questions, Shin

1. what is the reason to use "float" by converting time in different type?

2. If it were second base, varialbe "Xcount" would be "window_count(sec(time2))?

Thanks,

Byungkeun

• ###### 4. Re: How can I draw exact trendline that Tableau offer for the extraction of the slope data ?

1. Tableau's calculation sometimes does not allow combine different data field type such as "date" and "decimal number".

AS you may know, all the datetime are considered as numeric value with defining 1 day as "1", hour and shorter will be decimal that why need to use "float" not integer(INT).

2. As described above. that does not matter. however, if you need to disregards "time or date" and just recognize each data point as sequential data point,

you need to use index() or something instead.

Thanks,

Shin

1 of 1 people found this helpful
• ###### 5. Re: How can I draw exact trendline that Tableau offer for the extraction of the slope data ?

Shin, I appreciate your effort and time for the explanation in detail.

Thanks,

Byungkeun