3 Replies Latest reply on Jan 6, 2014 6:09 AM by Joshua Milligan

    Creating an hierarchie fields from different data table

    jabrane.belghith

      Happy new year for every one,

       

      I want to create a cross table with differents fields from differents data source .

       

      In my cross table , I'm trying to create a hierarchy across two data sources .Is It possible ?? Hierarchies.png

        • 1. Re: Creating an hierarchie fields from different data table
          Joshua Milligan

          Jabrane,

           

          When you have a primary source -- it defines the level of detail.  Everything from the secondary source(s) is aggregated, including dimensions.  That means that dimensions from the secondary source will display a value if there is a single value for that dimension at the level of detail defined in the view, an asterisk (*) if there is more than one value for the dimension at that level of detail, or NULL if there were no values at that level of detail.

           

          What that means, is that you might be able to define a hierarchy (a logical one in the veiw, not one that you define specifically in Tableau's metadata) if the dimension from the secondary source is the top level of the hierarchy and if it always has a single value for any lower level values.

           

          For example, this works because each State from the primary source has only one region in the secondary source (but note the NULLs where the blend did not match):

          0.png

           

          However, Category simply gives me the NULLs and a * because there are multiple categories in each state:

           

          1.png

           

          Hope that helps!

           

          Regards,

          Joshua

          1 of 1 people found this helpful
          • 2. Re: Creating an hierarchie fields from different data table
            jabrane.belghith

            thank you Joshuafor your Help ;

            How can we solve That problem to have the  * disappear , if we want to display all values .?? For Ex. if we have to display all dossiers / Tronçon  !  . Multiple Values.png

            Thank you again .

            • 3. Re: Re: Creating an hierarchie fields from different data table
              Joshua Milligan

              Jabrane,

               

              There are a couple of possibilities:

              1. Join the tables/views instead of blending.  This is only possible if two current sources are the same (e.g. all on a SQL Server) and not if they are different types (e.g. SQL Server and Excel).  This will of course change the granularity.
              2. Create a third data source that is all possible combinations of the dimensions you want in the view (e.g. dossiers / Tronçon / months).  Then use that as your primary data source in a blend.  Depending on how many dimensions you have and the cardinality there might be too many combinations to make this practical.

               

               

              Regards,

              Joshua