5 Replies Latest reply on Dec 24, 2013 5:23 PM by Evan Sebenius

    Viewing the range of a parameter

    Evan Sebenius



      I'm trying to figure out how to build the graph I want, and I bet you guys can help!


      I have a few dimensions:





      What I'd like to do is do a CountIf(X > BaseValue, X < MaxValue) - Basically, a count of the number of entries where X is in range.


      Is it possible for my X axis to be, well, X, and for Y to be the count of things that are within the range at that specific X?  I've tried using a parameter and sliding it manually but I'd really like a histogram of the data.

        • 1. Re: Viewing the range of a parameter
          Shawn Wallwork

          Hi Evan, I'll go out on a limb and say this can be done in Tableau. But it will help us a lot if you'd dummy up some data and post a packaged workbook for us to play with. I was with you all the way to the end when you mentioned histogram. The first half of your description seems to be pointing at a simple calculated field, but using bins might be the best route to get to a histogram. So post something and we'll take a look.



          • 2. Re: Viewing the range of a parameter
            Daniel Rahm

            Here's a sample workbook that has something similar to what you described. The "In Between" calculation is an if statement that determines whether a number, sales in this case, is below a High parameter and a Low parameter. The histogram is based off of the count of items that fall within that range.


            Let me know if the workbook helps. If it doesn't i'll tweak it.

            • 3. Re: Re: Viewing the range of a parameter
              Evan Sebenius

              Thanks for the help, guys!


              First, I want to apologize - 'Histogram' was the wrong word.  I meant line graph.  Oops!


              Daniel - I was able to get something akin to your 'In Between' working.  The problem is that I don't have a continuum in my data set that I can use to compare.  Also, I should mention that I'm using Public, so I unfortunately couldn't load your workbook.


              I've attached a sample data set that could be used to generate the graph I want.  I've also attached a sample graph that I hacked up in EXCEL (yuck, I know) that I'd like to build in Tableau.


              Thanks for your help trying to figure this out!

              • 4. Re: Viewing the range of a parameter
                Shawn Wallwork

                [Note: This answer is being brought to you from Ayala Cove, Angel Island, SF Bay CA. On a mooring. Glass sea. 0 kt. wind.]


                I've asked this question before and I'll ask it again: What is producing these files that have both .csv & .xls extension? When opened in Excel all the columns are grouped in a single column.


                So I'm really not sure how you get to 'creatures at specific levels' when the data you posted is aggregated:


                CreatureBase LevelMax Level


                You'll need to post non-aggregated data if you want us to help you produce the png you posted.





                • 5. Re: Re: Viewing the range of a parameter
                  Evan Sebenius

                  Thanks Shawn -


                  That is the raw data.  To add context around the data, I've got a big list of creatures for a game I'm working on, and I know what level they start showing up and what level they stop showing up.  What I want to do is make a graph showing how many different creatures are available at a given level.  I've set up a gantt bar chart that shows the range of each one, which is nice, but what I want to see is a graph where the X axis is the level and the Y axis is the sum of creatures where that level is in range.


                  To create the graph I attached, I created a sparse sheet with the Y axis as an incrementing range from 1 to 100 and then used COUNTIF on the level range of my creatures.  Because I was just slapping together an example I used some ugly substringing to parse '1-15' into the conditional as I needed it, but I could make it cleaner if I needed to.


                  What I don't know how to do is to join a range of 1-100 into a COUNT(Measure) and display them on a graph accordingly.


                  Does that help clarify what I'm looking for?


                  I really appreciate your help!


                  (Also, it's pretty cool that you're doing this from a boat)