5 Replies Latest reply on Nov 23, 2016 2:11 PM by Sujay Paranjpe

    grouping months

    Genki Ito

      I have changed months into two-month periods like Jan-Feb, Feb-March, March-April....etc.

      I can insert new periods just fine if they are mutually exclusive(Jan-Feb, March-Apr...) but I can't seem to find a way to use the other groups (Feb-March, Apr-May...)

      Please advise.


        • 1. Re: grouping months
          Sujay Paranjpe

          HI Genki,


          You cannot add the same dimension value in 2 different groups. Please elaborate how did you manage to get Jan-Feb, Feb-March, March-April

          Are you duplicating the month dimension to deal with this?


          Alternatively you can create calculated fields to achieve your objective. See example below (I have used sample super store as an example.





          1 of 1 people found this helpful
          • 2. Re: grouping months
            D Barnetson

            Hi Genki,


            Here is a work around using Sujay's suggestion along with the pivot function of Tableau.


            From the looks of it, you are using 3 different values that you would like to show under each group of months.


            What I have done to make this work was to, first; pivot the 3 values that I planned on representing under each group of months by clicking on the drop down arrow of the Profit column, then selected 'Pivot':

            (in my case, I used Sales, Profit and Quantity) *Note - These columns are NOT calculated fields. Calculated fields can NOT be pivoted, so you may be required to add the required columns to your data prior to pivoting.



            This created 2 new columns; 'Pivot Field Names' & 'Pivoted Field Values':



            Now, this is where Sujay's suggestion came into play. By using his formula for each month grouping (i.e.; Jan-Feb, Feb-Mar, etc...) I created a pill for each group: (in my example, I stopped at Apr-May, but you get the idea )



            For the final outcome, see the image below:



            In the example above, I left 'Show Header' checked on the 'Pivot filed names' pill to show the 3 measures that were used, but you can just uncheck 'Show Header' to get more of what you're looking for.


            I've also attached a packaged workbook for you to review.


            Hope this helps.


            2 of 2 people found this helpful
            • 3. Re: grouping months
              Sujay Paranjpe

              Excellent Don. Easy stuff !

              • 4. Re: grouping months
                Genki Ito

                Don, Sujay


                Thank you so much for your help!!!

                • 5. Re: grouping months
                  Sujay Paranjpe

                  You are welcome Genki.

                  One of the other way for me to know that I was helpful to you is to click on every "This helped me Yes | No" link.

                  Since you now have answer to your question, kindly mark this question as 'answered' so that it disappears from unanswered questions list from community forums. Have a great day ahead.