What feels like a long time ago, pre-Tableau 9, I wrote an article on how to create fixed bins from a measure in Tableau. At the time it was complicated, data duplication and blending was required. Then Tableau 9 came along and this suddenly creating bins from a measure became very easy.

The game changer was the FIXED Level Of Detail function.

The FIXED function now means a simple formula replaces a complex data duplication / data blend.

I’ll create the same stacked bar chart as in the original, using the same fields: Month, ListingId.& EnquiryCount

First to ‘fix’ the number of enquiries per listing: {FIXED [ListingId]: SUM([EnquiryCount])}

That field, which I called FixedEnqCount, can then be used to create the bins for grouping the enquiries per listing.

Enquiry Count Tableau Bin

Your bin field should be a dimension and should be put to the Columns shelf. Next is to count the number of enquiries per bin, drag the EnquiryCount to rows, and set to SUM.

Drag the month to the Colour shelf and it’s more or less complete. To show the % of total as in the original article simply click the drop down in the EnquiryCount pill on Rows. Select Quick Table Calculation, Percent of Total and make sure the Compute Using is set to Month.

Here is the simple LOD version.