4 Replies Latest reply on Jul 21, 2015 12:40 PM by Ben Page

    Bar Graph: Smaller Number as Biggest Bar




      Seeking some help with a bar graph and I just can't seem to get what I'm looking for.  I'm still fairly new so I might be overlooking something obvious, but here's the graph/concept I need some assistance with:




      I would like to have a way where a team with the a ranking closest to 1, would have the biggest bar in each category.


      In addition, now I really feel like I'm overseeing something with this question, but I'd love to be able to create two parameters (Team #1 / Team #2) to allow just two teams to be compared at a time.  After I initially created two parameters, I placed them on the columns bar in place of the current "Team" (which lists all teams), but it doesn't work out. 


      Thanks for any help that can be given!

        • 1. Re: Bar Graph: Smaller Number as Biggest Bar
          Ben Page

          The graph can be easily fixed with a sort. I've attached a workbook that tries to mimic what you have. If you right click whatever the field name is for the basketball metric (Def. Eff Rank, etc.) and hit "Sort" and then "Sort By Field" and choose NCAA Ranking, it should give you what you want.

          Bar Graph.sorting.PNG


          Additionally you can compare two teams by putting "Team on the filter shelf. When you open the quick filter, you'll be able to choose which teams you'd like to look at. In my example, I've subsituted Product Sub Category for Team.


          Hope this helps,


          • 2. Re: Bar Graph: Smaller Number as Biggest Bar



            Here's maybe a starting point to getting the inverted bar graphs.

            Because it stacks two measures, you may need to make a few of these and

            place them next to each other in a dashboard.


            Here is a similar thread that might have some other ideas:

            Highest values needs to have lowest bars on a chart and vice versa



            • 3. Re: Bar Graph: Smaller Number as Biggest Bar



              I'll use your example here and then get bring it back to my project.  In the picture you posted, chairs and chairmats create the most sales, followed by tables, boockcases, and office furnishings as a whole.  Let's say instead of showing sales on the Y-axis, you were to have "ranking" and at the top where you have "furniture" you were to have "sales".  Now, with the same four items on the x-axis, you were to have a bar graph where the "chairs and chairmats" would have a value of 1, and a bar graph height that would be taller than the bar graph height of "office furniture" that would have a value of 5. 


              Would that be possible?


              Some of my problems might lie in my .xsl database that I build for this example.  I have a vision in my head and quickly pieced it together to try to see if the foundation in my head was plausible within Tableau. 


              As far as the filters go, that definitely would work.  What I am really trying to go for though is to have two dropdown or input filters/parameters in order to compare any two teams from a list that would greatly exceed the number of teams I currently have as part of this. 


              Thanks for your quick response.


              • 4. Re: Bar Graph: Smaller Number as Biggest Bar
                Ben Page

                After I posted my previous response I realized that I misinterpreted your request. In order to to assign the smallest value the biggest bar, you'll have to sort by an Index. To do this, I created a calculated field called IDX with only Index() in it.

                IDX field.PNG

                You still want your same fields on the column shelf (I assume it's something like "Metrics" followed by "Team"). You want the second field sorted by Sales in Descending order. This is important so that the Highest value will receive the lowest Index, and the Lowest value will receive the highest index.


                IDX ranking.PNG


                Then you just want to put IDX as the sole field on the Row shelf and make sure that it's continuous. Also, click the dropdown on the IDX field on the row shelf and select "Computing using Team." This should assign the highest bar value to the highest index, which is also the lowest value for each Metrics category. In my example, I put Sales on the tooltip to ensure. Sorry about the confusion. Attached is an updated workbook.