1 2 Previous Next 25 Replies Latest reply on Jan 15, 2016 6:18 AM by Simon Runc

    Educational Brain Teaser: Bold Single Label on a Header

    Simon Runc

      Hi Brain Teaser Fans!

       

      Now that it has it's own Area on the forum it seemed rude not to celebrate this (thanks to Shawn Wallwork for all the Xmas/New Year Teasers!) with an interesting problem that came from a post today.The posters question was

       

      So using the SuperStore dataset (either EU or US!) can you create the following (the below shows Sales by Country from EU version, but it's the technique we're after!). In this solution I parameterised the Bold country, to make it extra flexible!

       

      Not a super hard (Rody Zakovich esque) one! but quite a fun one for understanding the age old Tableau'ism of Green and Blue pills!

       

      In the post we actually had a couple of solutions, so interesting to see any others. If you don't like fun and want to see the solution(s) the post is Emphasis a single label on an axis

       

      I'll post the/a solution in a couple of days

        • 1. Re: Educational Brain Teaser: Bold Single Label on a Header
          pooja.gandhi

          Hey Simon!

           

          Thanks for posting this. I think 'conditional formatting' in Tableau is a pretty hot topic especially for users migrating from Excel to Tableau. They are constantly looking for ways to mimic Excel functionalities. I saw the question Emphasis a single label on an axis and reached a solution too and then got pulled in a meeting, obviously since this is Tableau Community, the genius minds had already provided a solution

           

          I remember this question coming up early by another user on this thread Format one row? and I gave a similar answer at that time! I would have done it like this:

           

           

          Ofcourse you can get fancy by adding the label for quantity for the 'large' subcategory:

           

          Screen Shot 2016-01-12 at 11.39.04 AM.png

           

          Also instead of hardcoding 'chairs' in the calc, parameters would be great for a moving solution!

           

          But this works only when using a dimension on rows versus using 'measure names' on rows and 'measure values' on columns increasing the complexity. So for a favorable scenario if the data is 'wider', I think it would be best to reshape for it to be 'taller' structured for formatting to work as needed.

           

          Pooja!

          2 of 2 people found this helpful
          • 2. Re: Educational Brain Teaser: Bold Single Label on a Header
            Simon Runc

            nice work Pooja!...it's all about the Green Pills!!

             

            I think 'conditional formatting' in Tableau is a pretty hot topic especially for users migrating from Excel to Tableau.

             

            Yes this is very much in the realm of Excel (Cell Based) vs Tableau (Set Based)...I think very well articulated by Jonathan here Re: We don't need "Dynamic" Parameters.

             

            Where this connects to this thread is that there are multiple mental models (paradigm) that people come to Tableau with, here are three:

             

            - "cell-based" that comes from VisiCalc and its descendants, most notably Excel. We effectively operate on one cell at a time and can chain results together.

            - "variable-based" that comes from programming. In this model variables are defined and operated over so an operation could be something like "get the value of parameter Alpha, compare it to record 1, if it matches then return X, then compare to record 2, and so on". Writing database application code using cursors is using this paradigm.

            - "set-based" that comes from databases. This is where operations are performed "at once" across sets of records, like SUM([Sales]).

             

            One potential issue with just using MIN(1) is that both the Label and the Bars take up the same width, which when narrow is fine...but starts to look odd when it's wider...However on the image below I've managed to get them to be different sizes.....

            1 of 1 people found this helpful
            • 3. Re: Educational Brain Teaser: Bold Single Label on a Header
              pooja.gandhi

              Hi Simon!

               

              I love Jonathan's explanation of the mental paradigms. I also agree with him where he says 'the challenge is to better communicate how Tableau is different'. I think that line sums it all about how users wanting to do similar things in Tableau and mimic Excel need to be better explained as to how and why Tableau does things the way it does. We hear it all the time in the forums 'can I create a graph in Tableau that looks like this in Excel?'

               

              Coming back to the teaser, yes I agree that sizing of the axis can be a problem and does look odd. I like your posted solution on the other thread about using calculated fields instead of using min(1) trick. Now that I think about it, I think LOD can solve this too. Haven't tried it but I am sure it is possible!

               

              Regardless, this was worth the time and I will remember to use your technique some time in the future!

               

              Thanks Simon!

               

              Pooja.

              1 of 1 people found this helpful
              • 4. Re: Educational Brain Teaser: Bold Single Label on a Header
                Bill Lyons

                Good stuff! Thanks, Simon!

                 

                I had most of it figured out by using a dashboard with a separate object on a dashboard for the labels. What I especially enjoyed of your solution was the "fake axis." Very nice!.

                1 of 1 people found this helpful
                • 5. Re: Educational Brain Teaser: Bold Single Label on a Header
                  Rody Zakovich

                  Simon Runc sry for the late response, work has been a killer lately......

                   

                  I took a similar, but slightly different approach. Little more 'Hacky-Trickier'

                   

                  Hope you like it!

                   

                   

                  Rody

                  2 of 2 people found this helpful
                  • 6. Re: Educational Brain Teaser: Bold Single Label on a Header
                    Rody Zakovich

                    There are a few tricks here.

                     

                    1. Getting the Axis to show, without negative values.

                     

                    To do this, we have to rely on our old formatting friend

                     

                     

                    2. Setting up the Dual Axis Bar to a value that will fit the Text being Left Justified

                     

                     

                     

                    Then it is all about just creating two calcs for the Text Mark, to Bold and not to Bold, with NULL Values

                     

                    The Value of the Negative is only as relevant as the Longest String within the Category.

                     

                    Regards,

                    Rody

                    2 of 2 people found this helpful
                    • 7. Re: Educational Brain Teaser: Bold Single Label on a Header
                      Simon Runc

                      hi Rody,

                       

                      No problem...just coming out of the 'deep' myself!!

                       

                      Very nice mate...in the original question, I chose not to show the Axis...partly as it would give the game away! and partly as I ended up with negative figures under my headers...which I see you have managed to negate. As of writing this I was thinking 'How on Earth has he done that'...just worked it out though...Genius!

                       

                      ...Just saw these little guys

                       

                       

                      Definitely the best solution...and will incorporate this in the final solution tomorrow. Great work, as always!

                      • 8. Re: Educational Brain Teaser: Bold Single Label on a Header
                        Yuriy Fal

                        Simon, thank you for the Teaser. Rate it at 3.5 :-)

                         

                        How about this? Sure you've figured it out as a slight variation of yours ;-)

                         

                        Bold one Country Name.png

                         

                        Or may be that? Just to demonstrate what could (and couldn't) be done with pure headers.

                         

                        Country is Portugal.png

                         

                        Yours,

                        Yuri

                         

                        PS I could publish a wb of the above (9.2) upon request :-)

                        1 of 1 people found this helpful
                        • 9. Re: Educational Brain Teaser: Bold Single Label on a Header
                          Simon Runc

                          yes that's it!...nice work mate.

                           

                          Yes please post your wb up (looks like everyone has come to a similar solution, and I'll be posting the 'final solution' tomorrow anyway)...I like the second version, and interested to see how it's doing it!!.

                           

                          ...there are a couple of ways to do this (such as Bill's 2 sheet version), so will incorporate your version too, when I do the 'final solution' post tomorrow.

                          • 10. Re: Educational Brain Teaser: Bold Single Label on a Header
                            Rody Zakovich

                            Does anyone know the Algorithm Tableau uses to determine Major Axis Tick Marks?

                             

                            Have an idea.....

                             

                            Regards,

                            Rody

                            1 of 1 people found this helpful
                            • 11. Re: Educational Brain Teaser: Bold Single Label on a Header
                              Mark Jackson

                              You could also use rich text editing to achieve this. Have two fields on the text shelf: one that returns the value of the selected category and the other that returns everything but the selected category. I did mine as a gantt chart with labels on both sides.

                              1 of 1 people found this helpful
                              • 12. Re: Educational Brain Teaser: Bold Single Label on a Header
                                Yuriy Fal

                                Simon,

                                 

                                Please find the attached wb (9.2).

                                 

                                Yours,

                                Yuri

                                1 of 1 people found this helpful
                                • 13. Re: Educational Brain Teaser: Bold Single Label on a Header
                                  Rody Zakovich

                                  Thanks Simon Runc this Brain Teaser led me down a path to insanity..............

                                   

                                   

                                  Id on't even know how I did this LOL

                                   

                                  Rody

                                  • 14. Re: Educational Brain Teaser: Bold Single Label on a Header
                                    Simon Runc

                                    ...looks like you broke Tableau!!!

                                     

                                    ...disturbingly I think I know where you were going with that one too!...that would have been a very hacky solution!!!

                                     

                                    ...I think we can live with the 'Major Axis Tick Marks' under the headers!!

                                    1 2 Previous Next