知識庫

How To Create a Normal Distribution in Tableau Desktop


發佈時間 : 28 Sep 2020
上次修改日期 : 09 Feb 2024

問題

How to create a normal distribution known as Gaussian distribution in Tableau Desktop?

環境

  • Tableau Desktop

答案

The attached workbook demonstrates the following steps with using Sample - Superstore data source.
  1. Right-click a blank area of the measure pane, then click Create Parameter. 
  2. Name the new parameter as Bin Size with the following settings.
    • Data type: Integer
    • Current Value: 500 (set the bin size as you want)
    • Allowable values: All
  3. Right-click the Bin Size parameter, then click Show Parameter.
  4. Click Analysis > Create Calculated Field, name the new calculated field as Size of Sales (bin) with the following formula.
    INT([Sales by Customer] / [Bin Size]) * [Bin Size]
  5. Create a calculated field name the new calculated field as Customer Count with the following formula.
    COUNTD([Customer Name])
  6. Create a calculated field named as Sales by Customer with the following formula.
    {FIXED [Customer Name]: SUM([Sales])}
  7. Create a calculated field named as Mean with the following formula.
    {AVG([Sales by Customer])}
  8. Create a calculated field named as Standard Deviation with the following formula.
    {STDEV([Sales by Customer])}
  9. Create a calculated field named as Normal Curve with the following formula.
    (1/MAX([Standard Deviation])*SQRT(2*PI()))
    *
    EXP(-SQUARE(MAX([Size of Sales (bin)])-MAX([Mean]))/(2 * SQUARE(MAX([Standard Deviation]))))
    
  10. Place Size of Sales (bin) to columns and Normal Curve to rows.
這篇文章是否解決了問題?