Radial Mapping in Tableau

"As the Crow Flies" is an expression for the shortest path between two points (geographically) regardless of landscape. When working with geography, sometimes we want to see how various aspects of our business are performing relative to a central distance. In Tableau, we don't yet have a feature that let's us do this auto-magically, luckily though, it's not too hard to add!



Step 1: The Data

To begin, we need to identify some needs. To create the Radial Lasso in Tableau, we need data to plot the point. Here's the thing, the Lasso isn't really a part of the actual data, it's in support of it. We are merely using it for visual context to identify the circumference of our area. Additionally, we are going to make the central point be driven by a parameter, so we don't need to tie this to the points individually. With that being said, what do we do? Full Join


To begin, we need a dataset that already has the L attitude and Longitude in it. We don't yet have the ability in Tableau to reference the Generated Lats and Longs Tableau provides, so we need our own. We also need a dataset that has one column, Path, that has 360 rows. Rather than using this as a cross-join scaffold, I am going to instead Full Join it to my dataset. This will allow me to "add" it the data, without effecting the granularity of the dataset. This technique is very beneficial when doing layering, as we can bring two different datasets into one, without either one effecting the other.

Step 2: The Distance Calcs (For filtering)

Now that we have our dataset prepared, we need to start creating some calculations. First things first, let's create our Parameter. This is going to be used to to determine our central point, or the location we want to map the Radial Lasso around.


For this example, I am using a combined field of City and State.

Now that we have our Parameter, we need to use some LoDs to get the Latitude and Longitude of that selected City, State on every row.

These calculations are what we are going to use to find the distances (in miles) from our central point, to all others. This will allow us to "Filter out" any points that are going to be outside of our desired circumference. 

[SelectedLat1]

{MAX(IF [City and State] = [Parameters].[City and State] THEN [Latitude] END )}

[SelectedLon1]

{MAX(IF [City and State] = [Parameters].[City and State] THEN [Longitude] END )}

These calcs looks to see if the City and State match our Parameter, if it does, we grab those coordinates, and wrap them in a Fixed LoD that put's them on every record. This will allow us to access it very easily.

Now for a lot of Calcs. The formula I am using is Haversine, or great circle distances Additional information here https://rosettacode.org/wiki/Haversine_formula

To start we need to transform our Lats and Lons to be relative to a circle.

[lat1]

[selectedLat1]/180*PI()

[lon1]

[selectedLon1]/180*PI()

[lat2]

[Latitude]/180*PI()

[lon2]

[Longitude]/180*PI()

As you can see, we are taking our Parameter driven Lats and Lons, as well as, our Data's Lats and Longs, dividing it by 180 and multiplying it by PI.

Next we need to find there difference between those points.

[dlat]

[lat2] - [lat1]

[dlon]

[lon2] - [lon1]

Finally, we bring it all together and create the Distance Calculation. This will tell us (in miles) how far a point is from our central point (the point chosen in the parameter).

[Distance]

ROUND(3961 * 2 * ASIN(
    SQRT(
        POWER(SIN([dlat]/2),2) +
        POWER(SIN([dlon]/2),2) *
        COS([selectedLat1]/180*PI()) * COS([Latitude]/180*PI())
        )

),2)

Perfect! Now that we have our Distance calculation, we can create a parameter and filter to determine which points we want to keep in our visualization.

[Distance Filter]

[Distance]<= [Miles] OR NOT ISNULL([Path])

[Miles] is simply a Parameter that let's users input the distance they want. I am also including a provision to include my PATH (my circle data set we Full Joined in), which will allow us to still plot those points on our map. This will work as a great circle around the central point, i.e. I can select 100 miles, and get only the points that are within 100 miles (as the crow flies) from my selected point.


Perfect! Even though I have points all around the country, I am limiting those points to only be within 500 miles of the point I selected.

Here's the rub though, it's very hard to see where my central point it, or the total circumference of the area I am filtering on.

Step 3: The Radial Lasso Calcs

What I am about to show comes 100% from the amazing Emily Chen. She created a blog post on how to map a Circle on a map, and it is just fantastic! I am directly using here calcs here (with a slight mod). I recommend you checking out her post http://www.lesviz.com/blog/2016/09/13/how-to-draw-a-circle-in-tableau/

[Circle Latitude]

DEGREES(ASIN(SIN(RADIANS([selectedLat1]))
*COS(([Miles])/3961) + COS(RADIANS([selectedLat1]))
*SIN(([Miles])/3961)
*COS(RADIANS([Path]))))

[Circle Longitude]

DEGREES(RADIANS( [selectedLon1] ) 
+ ATAN2(COS(([Miles])/3961)
-SIN(RADIANS( [selectedLat1] ))
*SIN(RADIANS( [Circle Latitude] )),
SIN(RADIANS([Path]))*SIN(([Miles])/3961)
*COS(RADIANS( [selectedLat1] ))) )-90

If these calcs seem scary, don't worry, this can be copy/pasted in your solution.

So now that we have our Lasso Calcs, we need to bring it in together with our actual points. We want to have a single X/Y column so that we can leverage Tableau's mapping service (there are workarounds to get Dual Axis maps but let's keep it simple).

[X]

IF NOT ISNULL([Path]) THEN [Circle Longitude] ELSE [Longitude] END

[Y]

IF NOT ISNULL([Path]) THEN [Circle Latitude] ELSE [Latitude] END

For these calcs, I am just doing conditional plotting. This is where the Full Join comes in. For the dataset that has my Path field, I want to grab the Circle coordinates, and then my actual dataset I want to grab the raw coordinates.


Sweet, now that the hard part is done, we need to do some additional cleanup to make this look really good.

Step 4: A single point line is just a circle.

First trick coming at you fast! As you saw in the first image, I am using only a single X/Y, yet it appears as though I have two marks types, Line and Circle. So here is the trick, a single point line, is just a circle. So we can manipulate that feature to give the illusion of two chart types, even though it's really only one.

We being by changing our Mark Type to a Line.


Well that didn't work. Reason being, Tableau has no idea how to draw the correct oath right now. There are points everywhere. Luckily, we don't have to do much to resolve this, we simply take the [Path] field from our Circle Dataset and place it on the Path Mark. This will draw the outer line correctly for us. And, since our actual data didn't have a "Path" field, it will break those away, and make them individual marks.


Starting to come along! This is looking pretty good at this point, but we can improve it. For one, let's deal with the sizing. I want the Actual points to be sized by their Sales, and I want to make the line much thinner, so it doesn't draw too much attention. Luckily, we can do this by dragging sales onto the size mark.


Since our Circle Dataset didn't have any sales, we can use that (along with adjusting the size range) to make the line extremely thin, while giving our points a larger size. Remember, these points are circles, they are single mark lines, but we can treat them the same way as a circle.

Next, we want to separate these two elements even more visually. I want the Circle line to be a completely different color scheme from my points. So we need to create a calc to do that.

[Color]

IF NOT ISNULL([Path]) THEN -1
ELSE [Sales]
END

What I am doing here is setting up a color range I can manipulate. I know my sales are never going to be below zero, so I set my Circle to be that. Now I can create a color scheme that will "split" these two up.


Sweet. We can use a Custom Diverging color palette, with steps ,and a center point, to essentially create two different color palettes. Anything that is negative will be black, whereas anything positive will be on a range over blue colors (I really like this trick).

At this point, you could be finished, by I want to go for a slightly more modern look. Instead of having that line be solid, I want to make it dashed. So how do we do that? We (once again) manipulate features in Tableau.

As we saw by putting the [Path] field on the Path Mark, Tableau is breaking elements up into partitions. So to get our circle Dashed, we need to break up the circle into smaller partitions.

[BreakLine]

CEILING([Path]/2)

This calc will group our points into buckets of two. We can take this calculation, and put it on the detail shelf. Tableau will use this, along with the path, to only connect the points within each partition. This will give the illusion of a Dashed Line.


Woot! I would say, "And that's it", but this was a lot. That being said, there are a lot of visual and analytical benefits we can get from this chart. 

I hope you learned a few tricks, and saw Tableau in a different light. Tableau has a lot of amazing features, but it's when we use those features in unconventional ways, that the real fun begins.


How to fix Bar Charts widths "just right" when changing date levels

Quick and fun post of a recent trick I learned writing another post!



Have you ever created a Date Level swap (Drill down/up from Year-> Month, etc), and got irritated that the bar chart widths never looked great? Sure we can change the Date to Discrete, and do some other stuff, but it's still not what we want, it's not pixel perfect.

Well, I have the solution!

Step 1: Create the Date Level Calcs

To start, let's show how to create the Date Level Calcs. We need to begin by creating a Parameter.


Here we are just created a simple String List Parameter with our different Date Level choices, year, quarter, month, week and day.

If you are wondering why those values are lower cased on the left....let's move onto the calcs!

[DateSwap]

DATETRUNC([Date Level],[Order Date])

By having the Parameters values be lower-cased, we don't have to write a CASE statement, or an IF/THEN statement, we can just throw it in a Datetrunc and save ourselves some time.

Step 2: Plot the Chart

This step is easy enough, Plot the DateSwap field on the Columns Shelf and choose Exact Date Continuous, this will make sure that we plot the marks on the correct places. Next, we want to change the Mark Type to Bar. You should see something like this.

Yikes! That doesn't look good at all.

So what's happening? Well the Parameter is set to Year, but the Date field is configured to be exact date, so we are only plotting 4 bars on a much larger axis. 

How do we fix this? We could drag the Size all the way to the right, and get it looking a little better, but that doesn't solve the problem. We could also change the Size Mark to Fixed and set the units to 365, but that doesn't help us either since we will be changing Date Levels. So what do we do?

Step 3: The trick

Here is the trick, while writing http://www.datatableauandme.com/2017/12/how-to-density-scatter-plot-with.html I realized that we can set the Size Mark to be Fixed, and then could drag a Parameter onto the Size Mark, and it would make the units dynamic. I wonder if I could use a calc/field as well, and sure enough, you can! 

Before we get into the calc, we need to talk what we are working with in Tableau. We know that the X-Axis is each day across the range of our data. As we change Date Levels, we plot the Bar Chart on the 1st day of the datelevel,i.e. Year would be January 1st, Month would be the 1st of the month, Week would be the 1st day of the week. Knowing this, we need to create a calculation that dynamically tells us how many days are in each of these levels, per each unit. 

What does that mean? Not all Years have the same number of days, just like not all months have the same number of days. So we need a calc that will tell us how many days are in each unit as the datelevel changes.

[Size]

DATEDIFF('day', [DateSwap], DATEADD([DateLevel],1,[DateSwap]))

I thank my hours spent on Dates for this calc. Above finds the number of days in any year, quarter, month, etc by taking the Date difference in days from the date in question, and the next unit in line. 

As you remember, [DateSwap] changes our dates to the level configured in the Parameter [DateLevel], so by taking that date, and 1 to the unit set, and then taking the difference in days, we can determine exactly how many days are in a particular year, quarter or month (or week and day even though those are static).

Once we have that calc, our job is super simple. Change the Size Mark to Fixed, and drag the Size calc onto the mark. It needs to be a Continuous Dimension for this trick to work properly!

And that's it!

You can expand on this however fits your needs. You can put Parameters on there for Marginal Histograms, or whatever other calcs you need, just make sure it's Continuous! 

Now you can change Date Levels, and have pixel perfect width Bar Charts a long the way! Play around with the dashboard below.



How to Density Scatter Plot with Marginal Histograms


Special Thanks to Steve Wexler, Matt Chambers and Alan Eldridge.

I recently read a post by Alan Eldridge about creating Hex Bins in Tableau. He was inspired by someone in the Power BI community who showed off the technique. The idea was to use Hexbins to show density in a Scatter Plot, while showing the points. This gave a way to easily see where point fall. https://blog.databender.net/2017/10/15/hexbin-scatterplot-in-tableau/

I really liked this approach, and it inspired me to dig in and create an alternate version. One of the issues with Hexbins is the need for Density (a lot of points), and using Hexagons can cause some issues with audience understanding. So I wanted to create something that effectively use all the strengths of the Hexbins, while adding some additional visual information.

Step 1: Data Prep

The first step to create this chart is to create a Scaffold Dataset. This is very simple to do, it only require 3 Columns and 5 Rows.


This Scaffold is going to allow us to create the points for the "Squares" as well as, an additional point we can use to plot the raw data.

Step 2: Cross-Join

The next step is to take our Scaffold Dataset and Cross-Join it to our source. For this example I am using a 732 row dataset on Pokemon Attack and Defense Stats. Cross-joining is very simple to do in newer versions of Tableau. All we need to do is bring in the data from our source, and join it to the scaffold on a calculated field (1). This will multiple each row in our source data by a product of 5.


Step 3: The Calcs

Now that we have our data, we need to start creating some calcs.

We will start with creating the calcs necessary to "squares", or the density heat map of the Scatter Plot. (Side note...this would be much easier if we could create equally sized squares in Tableau with continuous Column/Row fields....).

Before we write any calcs, we need to create a Parameter. The idea of this chart is that you can control the binning size, and everything adjusts appropriately, so we start with a Parameter call BinSize.

  
You can adjust this parameter to fit your data, but in this example I am using a range with step size 10.

Once we have the Parameter, we can create the binning calcs

[DefenseBin]

INT([Defense]/[BinSize])*[BinSize]

[AttackBin]

INT([Attack]/[BinSize])*[BinSize]

Now let's create the XMajor and YMajor fields

[XMajor]

IF [Point ID] = 1 OR [Point ID] = 4
THEN [DefenseBin]
ELSEIF [Point ID] = 2 OR [Point ID] = 3
THEN [DefenseBin] + [BinSize]
ELSEIF [Point ID] = 5 THEN [Defense]
END

Here, we are saying for Points 1 and 4, we want to get the BinSize, since this the Left Most Points of our Square. For Points 2 and 3, we add the BizSize to the BinCalc to get the right more side of the Square. Then we add Point 5 to be the actual Defense amount. This will allow us to plot the individual points.

[YMajor]

IF [Point ID] = 1 OR [Point ID] = 2
THEN [AttackBin] + [BinSize]
ELSEIF [Point ID] = 3 OR [Point ID] = 4
THEN [AttackBin]
END

YMajor is very similar to XMajor except we set the top two points to the BinCalc plus the binsize and the bottom two points to be the Bin calc. We also ignore Point 5, which allows us to use these calcs to plot the square (polygons), while ignoring the the raw points. We will add that in the next calc.

[YMinor]

FLOAT(IF [Point ID] = 5 THEN [Attack] END)

On this one, we are only grabbing Point 5 and grabbing the Attack field. By doing this, we will be able to have two chart types, one for the Squares, and one for the data.

[SquareID]

STR(INT([Attack]/[BinSize]) * [BinSize]) + ' , ' + STR(INT([Defense]/[BinSize]) * [BinSize])

SquareID is a simple calc that will allow us to give each square an individual ID so we can create polygons with them. This is a hack so we don't have to bring in the lower level dimensions and draw unnecessary marks.

Step 3: Plotting

We start by plotting XMajor and YMajor on the Columns/Rows shelf respectively. We are also going to add SquareID, PointID and SUM([Number of Records]) to the details shelf.


From this point, we want to change the Mark Type to Polygon, and add the PointID to the Path Mark. This will create our Heatmap/Density squares.


Cool, starting to come along. Now we want to add the actual points. You might think this is pretty cool, and it has its' use cases, but, as Matt Chambers told me, this leaves a lot of room for ambiguity, showing the raw data with resolves that, and makes the chart.

We add YMinor to the Rows Shelf, Dual Axis, Synchronize and add Name (of the lowest level dimension) to the detail shelf. Also, be sure to change the Mark Type to Circle, and change the color to something the stands out from the background.


After this, be sure to hide the right most header.

Now that we have the Density Heat Map, we need to create the Marginal Histograms.

Step 4: Marginal Histograms

First, we will start with the Defense histogram. Add PointID to the Filter Shelf and set it to 1, this will avoid duplication issues since we densified the data with the scaffold. Take the DefenseBin (or whatever name you used for the Y axis) and place it on the Columns Shelf, then place SUM([Number of Records]) on the Rows Shelf.


Now this doesn't look great, so we need to do some formatting. First, let's dealing with sizing. Since we are going to be changing the size of the Bin, we need a way to dynamically change the size of the Histogram so it looks clean. Luckily, Tableau gives a way to do this now.

First, change the Size type from Manual to Fixed.


Unfortunately, this is kind of limiting. We can set the the size manually, but that really doesn't help us. So, here's a fun trick. If we set the Size Type to Fix, we can drag a Parameter onto the Size Mark. This means, anytime we change the Parameter size, the Width in Axis Units will update with it!


Final cleanup! Hide the Columns Shelf, we won't need that. Next, Format the Header so that the Marks are white. This will makes them invisible to the user, but they will still be there so we can line them up properly on the Dashboard.


Once we have this chart, we need to do the same thing for Attack Histogram. Follow the same steps as above, but do them relative to a Horizontal Bar Chart, image below for reference.


Big thing to note on this, I have fixed the axis so they line up exactly the same as the Density Scatter Plot. This, along with the White formatted headers, will allow us to line up these charge very precisely on our Dashboard.

Step 5: The Dashboard.

From here, it just about putting all the pieces together. Place the Density Scatter Plot on the Dashboard, and place the Histograms appropriately. The trick is to add Space on the Right Top of the Dashboard, or Text, to pad the the chart.



And that's it! Now you can change the Bin Size, and the histograms, and heat map will adjust appropriately.

You can see the interactive version here, and feel free to download it.


A Hack-Job way to create a Jump Plot in Tableau

Ok, so before I get into this...if you really want to use a Jump Plot, you should probably go to http://www.jumpplot.com/ and follow Chris DeMartini's awesome posts (also, I'm writing this fairly quickly, so I apologize if it sucks). But if you just want to create something quick as a proof of concept, or something that doesn't really need interactivity, or just because it's kinda of cool hack, here you go.

This will be a short post, so I'm going to run through this quick (because I refuse to put more time in the blog post than I did the viz). What is a Jump Plot? Per jumpplot.com.."The Jump Plot allows for scalable graphing of sequence event data with multiple variations to successfully visualize the performance of your workflow". Here is an image of a Jump Plot from Chris.


As you can see, there are "Nodes" that identify the various steps your workflow may go through, and the "Jump" is relative to a variable measure related to those steps (in most instances it would be time).

With that in mind, we can identify that there are 3 primary point to this viz. There are the nodes, and there is the Peak measure (time). The curved lines are visually important, but in terms of what we need, there are only 3 points.

Ok, so how do we cheaply make this in Tableau?

1. Data Prep


As you can see, I have a Category, a field called CheckPoint, NextCheckPoint and Value. There are the three points I need. But to do what I want in Tableau, I need to densify this data out. I could Pivot the dataset and get the same end goal, but that only works with Excel/CSV so I am going to use a Scaffold instead. My Scaffold Dataset just has 3 rows with values 1-3. I am going to crossjoin it to my datasource so that my data is replicated by a factor of 3.




Easy so far right. Ok, once we get in Tableau, we need to create our X/Y calcs.



Cool. So all we are doing here is padding out our data to fit on a Scatter Plot. So for the first 2 row on the X axis, we want them to be our Checkpoints, but we need a Checkpoint between these two, that we can use as the Pinnacle of our curve. So we do that by Subtracting the Difference between the points, dividing that by 2 and then adding it to the first point. Once we have that, we can flip over to the Y, and set the Check Points equal to 0 on the Y axis, and the Middle Point equal to our Value.

After that, we just need to plot them.


Perfect! No really, this is what I wanted. You may notice I put Category on the Color Mark, and made them all the same color...why did I do that? Well, I need it for the hack of course.

Once you are at this point, right click on the Canvas and show the Trend Line per Color.


This still looks kinda F'd up, but we are getting close! To see the glory, right click on the Trend Line and switch it to POLYNOMIAL 2 DEGREE.....



It's like Magic! Yeah, we are using a Trend Line to create a Jump Plot...hacky shit. So at this point we need to do some cleanup. You need to fix the Y axis to Start at 0, so that you don't see the never ending Trend Lines (which means this technique will not work for having reversed Jump Plots for sequences moving backward). We also need to deal with the note at the Top of the Pinnacle. Easiest way to do this is just to reduce the Size all the Way.

I then create Dual Axis on the Y at 0.7 for the Nodes, and make sure it is the Same Color as the Trend Lines (because Trend Lines will always overlap your marks).


So here is there final Hacky Product.

Now that you've read this, please go to JumpPlot.com And/Or this blog post on DataBlick http://www.datablick.com/blog/2015/08/20/time-to-get-hopping-with-jump-plot-by-chris-demartini-and-tom-vanbuskirk to do this the correct way.

Rody

Create a step chart in Tableau without Data Modeling

How to create Step chart in Tableau, without unioning/modeling your data.

This example is going to use Vanilla SuperStore, no modelling, just as it is out of the box.

To begin, we have to understand what a Step Chart is, and why is can be difficult to create it in Tableau.


All in all, it's a pretty simple chart. The problem, however, is the fact that we need 2 data points for each segment on the X axis. In this example, I'm using Months. Normally, we could do this by Unioning our Data to itself, so that we can create a path. But this requires work, and we have to literally double the size of our dataset. Since that's not what I want to do, let look at how we can build it just using Tableau.

The first step we need to do is figure out how to get two marks on the Month, where one is equal to the Current Month, and the Other is equal to the Next Month.

To begin, let drag Order Date (Months) onto the Columns shelf, and Sales on the Row Shelf.


Pretty simple, but we somehow need to get the Next Months Value into the Same "partition". So we can do that using a Lookup function.

LOOKUP(SUM([Sales]),1)

*You can also use the Previous Value using LOOKUP(SUM([Sales]),-1), depending on where you want the Line, or Flat line to fall.

Place that onto the same axis as Sales, so that Measure Name/Values are generated.


So now we have 2 values for each month: one that represents the current month, and one that represents the next month. At this point, the lines are being connected by the Measure Names along Month, so we need to change that so that it connects the measures then goes across through the months.

We can do this using an INDEX() function that we place on the Path mark.


Cool, this is much closer, but it's not what we want. See Tableau is using an INDEX() from the Next Value first, then the Sales Value. And it is the same in each Month, so to correct this, so Tableau draws it the way we want, we simply swap the order of the Measure in the Measure Values shelf, thus making Sales first, and Next Values sales second.

*If you used Previous Value instead of Next Value, you'd want to leave Previous Value first in the order on the Measure Values shelf.


And just like that, we have a Step Chart in Tableau without needing to do any data modeling.

Hope this helps!

Rody

Automatic Bins and Beeswarms in Tableau

Ok, quick and dirty how to (mostly because I'm copying a lot of this from a old post I put on the Forums).


Setting up the Automatic Bins

Tableau suggests the Optimal Bin Size by performing the following Calculation on the dataset.

( MAX([Measure Value]) - MIN([Measure Value]) )
/
3 + LOG(COUNTD([Measure Value], 2) * LOG(COUNTD([Measure Value]))

Click here for additional details Create Discrete Bins from a Continuous Measure

But Tableau also Rounds the Bin Size to the nearest Base 10, so $1,864 will Round to $2,000.

So I thought, why not create this record level with LoDs so that I can use Bins in an LoD.

Calculations

[MAX Sales] => INT(MAX([Sales]))
[MIN Sales] => INT(MIN([Sales]))

[Difference in Max/Min Sales] => [MAX Sales]  - [MIN Sales]

[Number of Bins] => INT(3 + LOG(COUNTD([Sales]), 2) * LOG(COUNTD([Sales])))

[Optimal Bin Size] =>

INT({
    FLOOR(INT([Difference Max and Min Sales] / [Number of Bins] )
          /
     POWER(10, FLOOR(LOG(INT([Difference Max and Min Sales] / [Number of Bins] )))))
*
POWER(10, FLOOR(LOG(INT([Difference Max and Min Sales] / [Number of Bins] ))))})

[Sales (Bin)] =>

FLOOR([Sales] / [Optimal Bin Size]) * [Optimal Bin Size]

WHY DO THIS INSTEAD OF JUST USING A NORMAL BIN? Because with one slight adjustment, we can change the level the BINS are calculating, without needing to re-create the bins as new data pours in.

INT({ FIXED [Sub-Category] :
    FLOOR(INT([Difference Max and Min Sales] / [Number of Bins] ) / POWER(10, FLOOR(LOG(INT([Difference Max and Min Sales] / [Number of Bins] )))))
    *
    POWER(10, FLOOR(LOG(INT([Difference Max and Min Sales] / [Number of Bins] ))))})

Now our Bins will automatically adjust to the Sub-Category (or whatever level you set it to).

The Beeswarm Calcs

Once we have our Automatic Bins, we need to setup the Calcs for the Beeswarm. This is pretty simple, we just need to create an X calculation to equally spread out values left and right.

[BeeswarmX] =>

IF INDEX()%2 = 0 THEN INDEX()-1 ELSE -INDEX()+1 END

Place this on the Columns Shelf, Min Sales on the Row Shelf, Order ID and Sales Bins on the Detail Shelf.


Now, we have to configure our BeeswarmX so that we can spreadout out of values.

To do this, we set the Calc to Compute using Order ID and Sales Bins, Restart every Sales Bins and do a Custom Sort on Order ID for Sales Ascending.


And that's it! It takes some calcs to setup, but it gives you a nice automatic distribution of your Dataset.