1 Reply Latest reply on Nov 26, 2010 4:30 PM by Joe Mako

    Creating a normal distribution chart

    Andrew Watson

      I'm trying to create a chart showing the YoY performance change for a group of items. I can calculate the performance YoY for each item showing the % increase/decrease using a Quick Table Calculation. What I need to be able to do is use this to show how many items had a 0% change, how many a -10% change, how many a 20% change, etc for each % change.

       

      This is where my problems start - I'm unable to count each item which have the same % change. I have attached some sample data for what I'm trying to do - in reality there will be a many '000 items but in the sample data I've included there are only 40-50 items included.

       

      What I'm picturing is the % change to be on the X axis with the item (pro_no in this example) counts in each % change on the Y axis - hopefully forming a bell curve, a normal distribution.

       

      Perhaps I need to create a calculated field based on the Table Calculation but I'm not sure how to do this. Maybe I need to do the calculation in the SQL populating the workbook but this seems like it should be unnecessary when tableau can do this calculation far easier than I can code it in SQL.

       

      I'm completely stumped by this so any assistance is greatly appreciated.

       

      Andrew

        • 1. Re: Creating a normal distribution chart
          Joe Mako

          This can be added to the list of example situations where it would be useful to use the result of a table calculation for partitioning another table calculations. A feature that I hope is added to Tableau.

           

          In the mean time, the closest I can get to your request is the attached. A histogram of the percent differences.

           

          One thing I was unsure of was how you want the percentages grouped. I grouped every 25% from -100% to 100%.

           

          Take a look at the calculations and the partitioning, and let me know if you have any questions.

           

          It may be possible to get the exact result you are looking for (a line instead of bars) with the addition of Custom SQL. Let us know if a line is what you need, or if the bar like histogram would work.

           

          What you see in the attached is a stacked bar, a mark for each "pro_no". This can also prove useful for the building of Actions that link across sheets linked on "pro_no".