4 Replies Latest reply on Aug 24, 2018 10:30 AM by srikanth Malineni

    How to data model in Tableau?

    Matthias Winkler



      I'm very new to Tableau, but was working many years with Qlikview and SQL. My current task is to build an analysis dashboard in Tableau which is based on several excel-files from SAP systems and further databases. Some of the files need to be unioned since they consider different months. Other files have to be joined through creating a new key field (e.g. concatenation of field1 and field 2). In Qlikview you usually do those data transformations like joining, concatenating, counting etc. in the load script. However, Tableau seems to be limited when it comes to scripting and especially when there is more than one data source (e.g. data from two or more excel-files). How would things like this be done in Tableau? I actually don't want to copy and paste those excel-files manually to one single file every time I have to renew the data since the process should be automatized as far as possible. Would you do the data transformation on a SQL-server and then make Tableau loading the data from it? Any thoughts or recommendations?


      Thank you :-)


        • 1. Re: How to data model in Tableau?

          Hey Matthias,


          Welcome to Tableau and welcome to our forums! In our product help we have many of the options available to you for preparing your data:


          Set Up Data Sources


          However, the more specific a question you ask, the better an answer you'll get. Give our unions and joins a try, and if you hit any snags, let us know and we can try to help you move past it.


          Thanks for posting,



          1 of 1 people found this helpful
          • 2. Re: How to data model in Tableau?
            Matthias Winkler

            Hey Diego,


            thanks for your reply. My task would be the following:


            Table 1:

            Sales IDCustomerMonthProduct
            1Company A1Product XY


            Company B1Product YZ


            Table 2:

            Sales IDCustomerMonthProduct
            3Company C2Product XY


            Company A2Product YZ


            Table 3:

            Sales IDProductPrice
            1Product XY$100


            Product YZ$200
            3Product XY$150
            4Product YZ$300


            My database is Table 1, 2 and 3. Table 1 and 2 need to be unioned since they consider different months. Then, Table 3 needs to be joined to this unioned table. But since the same products are sold with different prices, it has to be joined on a concatenated key consisting of "Sales ID" and "Product", e.g. "1_Product XY" for the sale of Product XY to company A in month 1. The final table would be:


            Sales IDCustomerMonthProductSales ID_ProductPrice
            1Company A1Product XYCompany A_Product XY$100


            Company B1Product YZCompany B_Product YZ$200
            3Company C2Product XYCompany C_Product XY$150
            4Company A2Product YZCompany A_Product YZ$300


            Please note that this a very simplified example and in reality there are 3 further tables, which need to be joined on individual (concatenated or modified) keys. In addition, usually more than one product is assigned to a Sales ID. As already mentioned, all tables come from different excel files.

            I'm generally familiar with joins, unions and so on but I'm unsure where to solve this problem in tableau.


            Thanks in advance!


            • 3. Re: How to data model in Tableau?
              RAMI ALKASSEM

              Hi Mathias,


              I had the same exact enquiry, did you get an answer on this, its very strange that Diego didnt reply despite that the question is very simple.


              Best Regards,


              • 4. Re: How to data model in Tableau?
                srikanth Malineni

                Hey Matthias,


                You can do this using Tableau Prep, which is used for preparing , cleansing and making your data ready for use in tableau. We can create flows which can be saved and refreshed whenever we have changes to data. Hope this helps.