6 Replies Latest reply on Jan 25, 2018 5:50 AM by anoosha shetty

    Create a new dimension

    anoosha shetty

      Hi All ,

       

      I have use case

      where I have to display something like below in rows :

       

      Screen Shot 2018-01-23 at 2.35.44 PM.png

       

      So in my dataset , there is a column called "New_existing" , which has 3 values "NEW","Existing","Missing"

       

      And in the above screenshot "Total " is the combination of "NEW","Existing","Missing"

       

      And "TOTAL (Ex. Missing) " is the combination of "NEW","Existing"

       

      I have found that we can "create groups" in  tableau , so I managed to create 2 groups( TOTAL (Ex. Missing)  ,Total )  based out of column "New_existing"

       

      So now my question is there any way I can have a column called "TYPE" which would show me values just as shown in the above picture ?

        • 1. Re: Create a new dimension
          Norbert Maijoor

          Hi Anoosha,

           

          Find my approach based on UNION as reference below and stored in attached workbook version 10.3 located in the original thread.

           

           

          1. Define a Union with 3 sheets

           

           

          1. D1. Type:

           

          if [Table Name]="Sheet1" and [New_existing]="NEW" then "NEW"

          elseif [Table Name]="Sheet1" and [New_existing]="Existing" then "EXISTING"

          elseif [Table Name]="Sheet1" and [New_existing]="Missing" then "MISSING"

          elseif [Table Name]="Sheet1$" and ([New_existing]="Missing" or [New_existing]="Existing" or [New_existing]="NEW") then "TOTAL"

          elseif [Table Name]="Sheet11" and ([New_existing]="Existing" or [New_existing]="NEW") then "TOTAL (ex. MISSING)"

          END

           

          2. Drag the required objects to the indicated locations and exclude "Null" D1. Type

           

           

          Regards,

          Norbert

          1 of 1 people found this helpful
          • 2. Re: Create a new dimension
            anoosha shetty

            Hi Norbert ,

             

            Sorry I am very new to tableau world , and I am using the version. 10.2 ,hence could not open the file you have attached .

            I want to mention that  in the above question "New_existing " column which I have mentioned is in from the  single excel sheet (say called "raw data")  , I have pulled it in the datasource field.

             

             

            Screen Shot 2018-01-24 at 12.28.27 PM.png

             

            I have 2 questions :

             

            1. Are you asking me to do the union of same "Raw data" sheet again ?

             

            2 .

            In the above query you have attached :

            if [Table Name]="Sheet1" and [New_existing]="NEW" then "NEW"

            elseif [Table Name]="Sheet1" and [New_existing]="Existing" then "EXISTING"

            elseif [Table Name]="Sheet1" and [New_existing]="Missing" then "MISSING"

            elseif [Table Name]="Sheet1$" and ([New_existing]="Missing" or [New_existing]="Existing" or [New_existing]="NEW") then "TOTAL"

            elseif [Table Name]="Sheet11" and ([New_existing]="Existing" or [New_existing]="NEW") then "TOTAL (ex. MISSING)"

            END

             

            Can you explain me what is [Table Name] ? and what is Sheet1 , Sheet1$ , and Sheet11 ? in my  reference .

             

            This  will be  really helpful

             

            Thanks,

            Anoosha

            • 3. Re: Create a new dimension
              Zhouyi Zhang

              Hi, Anoosha

               

              Please see the explain below

               

              and the online help link for your reference.

              Union Your Data

               

              Hope this helps.

               

              ZZ

              • 4. Re: Create a new dimension
                anoosha shetty

                Hi ZZ ,

                 

                Thank you so much for the detailed explanation .This worked like magic  .

                Happy to learn new stuff everyday like this .

                 

                Norbert Maijoor -- thank you so much for the direction you have given .

                 

                Thanks all

                 

                Regards ,

                Anoosha

                • 5. Re: Create a new dimension
                  Norbert Maijoor

                  Hi Anoosha,

                   

                  You are welcome. Keep them coming if you have any challenge on you journey in the land of Tableau.

                   

                  Regards,

                  Norbert

                  • 6. Re: Create a new dimension
                    anoosha shetty

                    Hi Norbert ,

                     

                    Regarding this new dimmesion we have created  , which we called "TYPE" now has values new, existing,missing,total and Toal(ex missing)

                    After learning this I have created one more dimension in the similar fashion called it  "  TYPE(DOM/INTL)  "    with values "Domestic" ,"International" and "Total"  in it .

                     

                    Now I want to have a view  like below : -

                    Untitled.png

                     

                    So I created 2 new dimension  one as TYPE(DOM/INTL) , and  TYPE(new/existing)

                     

                    But when I get both of these dimensions in ROWS like below : I can only see "TOTAL" for "international " and rest of the value (new , existing ,missing,total(Ex.missing) DOES NOT even show up .

                    Screen Shot 2018-01-24 at 3.12.02 PM.png

                     

                    Is there any restriction in tableau, to use dimensions like this way ?

                     

                    How do I get to display all the values of TYPE(new/existing)  against TYPE(DOM/INTL)

                     

                     

                    Thanks,

                    Anoosha