9 Replies Latest reply on Feb 27, 2016 9:01 AM by Sathya Raj Eswaran

    Merged Columns

    Sneha Vijay

      Hi ,


      I wanted to replicate the merged columns in Tableau as seen in the Excel ( Sample ) . Is it possible ? And How do I do it?




      Time Time NameLocationSales
      WeekWeek 1Location 12
      WeekWeek 2Location 13
      WeekWeek 3Location 14
      WeekWeek 1Location 22
      WeekWeek 2Location 23
      WeekWeek 3Location 24
      MonthMonth 1Location 12
      MonthMonth 2Location 13
      MonthMonth 3Location 14
      MonthMonth 1Location 22
      MonthMonth 2Location 23
      MonthMonth 3Location 24
        • 1. Re: Merged Columns

          Drag Location on rows, Time and Time Name on columns and sales on 'text' button on the marks card.

          2 of 2 people found this helpful
          • 2. Re: Merged Columns
            Sneha Vijay

            Hi pooja,


            Thank you for the reply. 


            However, as per my requirement , the client wants to add the labels like month and week , assuming that the data does not have the Time column as shown below:

            Is it possible to add a merged column name as in the first screenshot?

            • 3. Re: Merged Columns

              Hi Sneha!


              Yes, you can create a calc like: SPLIT([Time Name], " ", 1)


              and drag that calc on columns along with other fields:


              3 of 3 people found this helpful
              • 4. Re: Merged Columns
                Shawn Wallwork

                Wow! I've got to start paying more attention to what functions are added to each release. I don't remember ever hearing the mention of SPLIT() being added:

                Anybody know if there is a list of new functions that were added to each release? Thanks Pooja, that function could be very handy!






                EDIT: You get both a 'like' and a 'helpful'. (Hope that's not too 'overly enthusiastic'. )

                3 of 3 people found this helpful
                • 5. Re: Merged Columns
                  Stephen Shields



                  I have found myself noting the same thing and asking the same question, if someone finds a link to documented changes between versions in terms of functions that would be helpful.



                  • 6. Re: Merged Columns

                    Shawn, I think that was a result of 'split' being an in-built functionality post version 9.0 when you split fields in the data connection window. Although, I am not aware of documentation that specifically talks about functionality addition in newer versions. I have seen a few blogs around new functions that were launched in V9 etc but nothing specifically about syntax. I hope someone has an answer too, could be quite handy.


                    And no, that wasn't overly enthusiastic, that was you being appreciative

                    2 of 2 people found this helpful
                    • 7. Re: Merged Columns
                      Sneha Vijay

                      Hi Pooja,


                      Thank you or your suggestion .I will surely use it in my work.


                      If I could ask that in my clients data , we do not have the column name as 'Time Name' as is something else like 'YTD' . Can we still write a calculated field  to give the label any desired name?

                      • 8. Re: Merged Columns



                        Yes, you can use the SPLIT function to split the field, be it anything. The important aspect is the delimiter used in splitting not what the field actually is. Here it was a space between the 2 words in a string, if you have something else, you can use the appropriate delimiter to split it.


                        Hope that helps, if this has been answered, go ahead and mark the thread as answered!




                        • 9. Re: Merged Columns
                          Sathya Raj Eswaran

                          Hi Pooja,


                          How to do Merged columns for "Measure Names" .Please see the below attached .In that



                          UC Visit ,ER Visit ,Scheduled Visit, Rating, ER Rating, Score


                          are measure names .I want the merged column name based on "Measure Names".







                          Last  Visit in 6 MonthsRisk  levels
                          NameUC VisitER VisitScheduled VisitRatingER RatingScore