Thanks, Jim! However, there seems to be a file missing in the zip package u attached.
Anyway, as shown in the tableau file attached, the bin size is 100k, and I want to show the percentage of the bin "100k" and maybe three more up to "1000k". It seems the "show missing values" is ticked on the bin pill ...
May I have your advices?
Sorry, I think I misread your initial question (from your graph it looked like the 500K bin was missing, but I think the font was just difficult to read).
It sounds like the issue is that you want to set min and max values for your histogram, regardless of whether there is data in the smallest and largest bins. You want your graph to look like this:
To do this you need to control the x-axis, which is easy to do with a continuous variable (just edit axis, set range, set tick marks).
Therefore to create the "histogram" (really bar chart) above, I used Joe Mako's nifty formula:
INT([Value]/[Bin Size])*[Bin Size]-IIF([Value]<0,[Bin Size],0)
Once you create the calculated field, move it to the dimensions shelf and add it to your view. Then select the pill and convert to continuous and edit the axis.
P.S. Some might argue this isn't a histogram (there shouldn't be any space between the bars). If this bothers you, you might use a frequency polygon (i.e., line plot) which shows the same information with less ink.
missing bin_jim.zip 76.2 KB
1 of 1 people found this helpful
Another trick you might find helpful is to make the [bin size] a parameter.
Then you can adjust the bin size "live" to determine the best size or see if the bins are obscuring a pattern. ...