Skip to main content

#Start0 人がディスカッション中

Sumeet Bedekar が「#End」で質問

Hi Data Lovers,

 

I have dummy data (also attached in excel file) as follows,

How to Calculate Slope, Intercept i.e [y = mx + b] ???

 

In order to calculate a straight line, we need a linear equation i.e.:

Y=mX+B

 

Where M= the slope of the line, b= the y-intercept and x and y are the variables.

Therefore, to calculate linear regression in Tableau you first need to calculate the slope and y-intercept.

 

And the Trend line Equation for this is as -

y = -6970.5x + 3E+06 ------ > y = mx + b

 

Output from Excel.

 

pastedImage_9.png

 

Well I am aware that, we can add trend line on line chart.

 

However I am looking for the way to calculate Slope, Intercept.

 

Look forward to learn from Community

 

Regards,

Sumeet

 

Note:-

I have gone thro' few blogs like -

https://www.thedataschool.co.uk/emily-dowling/calculate-linear-regression-line-tableau/

https://www.biztory.be/2017/02/28/slope-and-intercept-tableau/

24 件の回答
  1. 2017年11月2日 19:37

    Hi @Venkat, thanks for posting the links (FYI I'm a co-author of the Covariance, Trend Lines, Correlation Coefficient R and R-Squared document), unfortunately none of the links actually answer Sumeet's question. Next time please make sure to test the instructions you are linking to against the data and/or workbook that the questioner has provided to make sure that the link is actually useful for the problem at hand.

     

    Hi @Sumeet,

     

    You didn't say if you needed the trend line results as a display or to use in a subsequent calculation, so there are a couple of options here. Also you weren't clear if you wanted to use Tableau's native trend lines or the result from Excel, and that creates different options as well.

     

    I hadn't studied this before, it turns out that x for Excel's linear trend line and Tableau's linear trend line are computed in different ways so the m (slope) and b (intercept) of y=mx+b are different in each tool.

     

    Tableau's Trend Lines

     

    In Tableau x is the value of each mark of the pill on Columns. In the case of dates then x is the date converted to a number, which for an Excel source is the number of days since 0/0/1900 (with an additional day for the non-existent leap year in 1900 due to some very old design decisions).

     

    Therefore in this view where I've converted the original string date field into a field of a date data type (using a custom split on the string, changing the data type to date, and then using a custom date format to match the original date format) the trend line is -995.78Date - Split 1 + 4.57618E+07 where Date - Split 1 is x.

     

    Hi @Venkat, thanks for posting the links (FYI I'm a co-author of the Covariance, Trend Lines, Correlation Coefficient R and R-Squared document), unfortunately none of the links actually answer Sumeet'

     

    Excel's Trend Lines

     

    In Excel x is the index of whatever series is creating the X axis so the first point is 1, the second point is 2, and so on. In the screenshot below are three trendlines that all have the same -6970.5x + 3E+06 formula. The first is the original line using the string dates, the second is the dates converted to numbers, and the third uses a simple index from 1-13:

    Screen+Shot+2017-11-02+at+3.02.40+PM.png

     

    Therefore Excel and Tableau have different default behaviors: Excel uses an index for the x-axis, Tableau uses the value on the x-axis. Both are effectively accurate, and you can pick the one you want to use. However to get a view that exactly replicates Excel's results in Tableau takes some extra effort.

     

    To start, here's a view with the Excel trend line results using Tableau's native trend line where instead of the Date on Columns I'm using the INDEX() table calculation with compute using on the Date:

     

    Screen+Shot+2017-11-02+at+3.16.47+PM.png

     

    There's no way to get that Index axis to have the original date structure of the string Date field that I can find. Therefore to get the  Excel results in Tableau *and* have the original date structure on the x-axis requires custom calculations. I used the WINDOW_COVAR formulas that require Tableau v10.2 or higher described in Covariance, Trend Lines, Correlation Coefficient R and R-Squared where x = INDEX() and y = SUM($).

     

    Here's the workout view...the table calculations all have a compute using on the Date dimension:

     

    Screen+Shot+2017-11-02+at+3.23.25+PM.png

     

    Now here's a view where the workout view was duplicated and the y=mx+b equation placed in the title:

     

    Screen+Shot+2017-11-02+at+3.24.24+PM.png

     

    In this view I used a dual axis to create a line for the trend on the secondary axis using marks:

     

    Screen+Shot+2017-11-02+at+3.25.15+PM.png

     

    Tableau doesn't presently support dashed marks for lines, there are a couple of different tricks if you want that.

     

    Here's one: in this view I made the trend line marks have 0% opacity and then added a trend line on top of that to get the dashed lines. However this view has problem in that when hovering over the trend line the trend line tooltip shows an R squared of 1 and a p-value of < 0.0001 and these are inaccurate because they are a trend line based on the trend line marks and not the actual data. Note that in this case I also had to switch to use using the Date - Split 1 dimension (and change the compute using of the table calculations) because Tableau's trend lines require a continuous date or number.

    Screen+Shot+2017-11-02+at+3.30.01+PM.png

     

    v10.2 workbook is attached, let me know if you have any questions!

     

    Jonathan

0/9000

こんにちは。

過去のフォーラムもいろいろとみてみたのですが、

わからなかったので教えてください。

 

TV会議のログを分析していて、その中で、

どの時間に接続が集中しているかを接続ポイント数としてカウントし、平均して曜日やその月の傾向(どの時間に接続が集中しているか)をみたいと思っています。

start time/end timeをピボットして、それぞれ1/-1で置き換え、running_sumでその日毎、また合計はエリアグラフとして作成できました。

しかしながら、その合計をcountd(日数)でわっても、平均のグラフになりません。どうしたらよいでしょうか?

 

データはこのような感じで、TV会議のスタート時間、終了時間、接続元会議室、接続先会議室の名称があります。

##start timeend timecall destination IDcaller id12018/5/1 10:002018/5/1 11:00tokyo_aosaka_a22018/5/1 10:302018/5/1 11:30tokyo_bkyushu_a32018/5/1 10:452018/5/1 12:30osaka_bkyushu_b42018/5/3 12:002018/5/3 14:30tokyo_cosaka_b52018/5/3 12:002018/5/3 13:15tokyo_bkyushu_a62018/5/4 9:002018/5/4 10:30osaka_atokyo_a72018/5/4 10:002018/5/4 14:00osaka_bmitaka_b82018/5/4 10:152018/5/4 15:00kyushu_ctokyo_a92018/5/4 14:452018/5/4 15:20kyushu_bosaka_b102018/5/5 9:002018/5/5 10:00tokyo_akyushu_a112018/5/6 16:002018/5/6 17:00tokyo_bosaka_a122018/5/6 16:002018/5/6 17:15tokyo_cmitaka_b132018/5/7 15:002018/5/7 18:30tokyo_bosaka_b142018/5/7 15:002018/5/7 16:00tokyo_aosaka_a152018/5/7 16:002018/5/7 18:00kyushu_aosaka_a162018/5/8 11:452018/5/8 13:30kyushu_bosaka_a172018/5/8 13:002018/5/8 14:00osaka_atokyo_c182018/5/9 9:002018/5/9 12:00osaka_atokyo_b192018/5/9 11:002018/5/9 12:00tokyo_aosaka_b202018/5/10 9:002018/5/10 10:30osaka_atokyo_c212018/5/10 10:002018/5/10 14:30tokyo_bosaka_b222018/5/10 11:002018/5/10 12:30tokyo_bosaka_b

 

↓エリアで示されているのが曜日ごとの合計接続数を表すグラフ、

それを日数で平均したいが、現状のやりかただと、細い棒がいくつか現れるだけ、、、、

Running_sumの平均

 

よろしくお願いします。

16 件の回答
  1. 2018年7月3日 3:10

    ちょっと気になってみてみましたが、盛大に間違ってましたね。

     

    Lei Chen  が修正してくれたのかと期待したら、なんと遊んでるだけだったので、以下のとおり修正します。

     

    table calc と G.total の組み合わせは、常にややこしいので、正攻法では無理そうです。

    なので、以下の準備が必要かと思われます。

     

    ちょっと気になってみてみましたが、盛大に間違ってましたね。 Lei Chen が修正してくれたのかと期待したら、なんと遊んでるだけだったので、以下のとおり修正します。 table calc と G.

     

    接続の関係で、計算式がすべて崩れるので、全部やり直しました。

    pastedImage_1.png

     

    pastedImage_2.png

     

    pastedImage_3.png

     

    pastedImage_5.png

     

    ちなみに、Number of Date はこうなります。

    pastedImage_6.png

     

    pastedImage_7.png

     

    pastedImage_8.png

     

    pastedImage_9.png

     

    Thanks,

    Shin

0/9000

Hello! This is a broad question, but I would love to hear some best practices/experiences from this community. I am a current HubSpot power user/developer for a consulting agency, but we are considering expanding to HS and SF. Has anyone done the same? Any recommendations on where to #start with training or mind shift anyone else had to make when doing this? Any advice would be helpful! Thank you! 

1 件の回答
  1. Vuk Stajic (MVRK Inc.) Forum Ambassador
    2021年8月11日 16:37

    Sorry Brittanie,

     

    Are you saying your team is going to stay with HubSpot and expand to using SF as well?

     

    What products from SF do you anticipate you will be getting?

     

    There are a lot of great places to start learning, Trailhead being the best.

     

    For data migration and process migration, there are a lot of things to consider.

     

    The best practice is to map your processes, develop functional requirements, and then to build the system based on those requirements.

     

    Ensure your future users will provide feedback, take this as an opportunity to improve not just carry over existing processes.

     

    I could talk about this for hours, so if you want to connect let me know and you can find me on LinkedIn easily.

     

    Most importantly, make sure you have expert SF advice at least early on for a smooth transition.

     

    Focus on a minimum viable product, not a crazy complex solution, to start with.

     

    Good luck!

0/9000

I am new to salesforce and i want to know how and where i can start . I am also connfuse as a beginner that i have to start as a admin or developer

3 件のコメント
0/9000

Welcome to ENABLE THE USER EXPERIENCE WITH DATA 

Getting Started webinar series today.

Discover how to import clean data, create valuable reports and validate the solution with your business users.

 

Don't miss out and Register now! https://register.gotowebinar.com/rt/3379082201438560257

Webinar starts at 2pm-3pm AEDT [APAC].

 

Here are the webinar resources just for you:

Getting Started Resources

Standard Help & Training Resources

Instructor-Led Training

AppExchange

Help & Training Links

#Start With The Fundamentals 

#Getting Started Autograph 

0/9000

Welcome to ENABLE THE USER EXPERIENCE WITH DATA 

Getting Started webinar series today.

Discover how to import clean data, create valuable reports and validate the solution with your business users.

 

Don't miss out and Register now! https://register.gotowebinar.com/rt/3379082201438560257

Webinar starts at 2pm-3pm AEST [APAC].

 

Here are the webinar resources just for you:

Getting Started Resources

Standard Help & Training Resources

Instructor-Led Training

AppExchange

Help & Training Links

#Start With The Fundamentals 

#Getting Started Autograph 

0/9000

Welcome to ENABLE THE USER EXPERIENCE WITH DATA Getting Started webinar series today.

Discover how to import clean data, create valuable reports and validate the solution with your business users.

 

Here are the webinar resources just for you:

Getting Started Resources

Standard Help & Training Resources

Premier Online Training

AppExchange

Help & Training Links

#Start With The Fundamentals 

#Getting Started Autograph 

1 件のコメント
0/9000

For the attendees for our "Getting Started: Start with the Fundamentals" webinar today:

Here are the webinar resources just for you:

 

Premier Online Training

Administration Essentials for New Admins: http://sforce.co/2amR8Ov

Administration Essentials for the Service Cloud: http://bit.ly/1jTyc6Q

 

Standard Help & Training Resources

Getting Started: Navigating Salesforce: http://bit.ly/1jTybjf

Getting Started: Administering Salesforce: http://bit.ly/1jTygUa

 

#Start With The Fundamentals

7 件のコメント
0/9000

Anyone knows if it is possible binding the "start" value for a step (bar chart) dinamically with its first (grouping) result? It'd be something like this? 

 

"start": "{{cell(1_1.result,0,\"grouping\").asGrouping()}}"

 

(It isn't working...)

6 件のコメント
  1. 2018年4月26日 15:36

    Use something like this

    \nresult = filter result by starts_with('CampaignName',\"{{cell(Region_2.selection,0,\"value\").asObject()}}\")

0/9000

For the attendees for our "Getting Started: Start with our Fundamentals" webinar today:

Here are the webinar resources just for you:

Premier Online Training

Administration Essentials for New Admins: http://sforce.co/2amR8Ov

Administration Essentials for the Service Cloud: http://bit.ly/1jTyc6Q

 

Standard Help & Training Resources

Getting Started: Navigating Salesforce: http://bit.ly/1jTybjf

Getting Started: Administering Salesforce: http://bit.ly/1jTygUa

 

#Start With The Fundamentals 

#Getting Started Autograph 

 

Please post your questions here on this thread. @* APAC Success Central * 

0/9000