4 Replies Latest reply on Aug 23, 2018 2:59 AM by Ivan Muccini

    Bar graph with one measure and multiple dimension

    Ivan Muccini

      I have to make a bar graph which shows the multiple requests made by one customer. I cannot duplicate the rows as there are many columns like ID, state, country, etc. some of these columns are uniques dimensions that I cannot duplicate. Under the request column, each cell has the request placed by the customer. Some have a single request and some are a combination of requests. So I made 4 calculated fields to see if that particular request was made. Now I am not able to make a single bar chart to show how many customers made that particular request.

       

      I have attached the tableau sheet

        • 1. Re: Bar graph with one measure and multiple dimension
          Shinichiro Murakami

          HI Ivan

           

          Typical approach  for this issues is below.

           

          Original data

           

          Make union duplicate data up to the number of the name in one cell.

           

           

           

           

           

           

           

           

          Thanks,

          Shin

          1 of 1 people found this helpful
          • 2. Re: Bar graph with one measure and multiple dimension
            Ivan Muccini

            @Shinichiro Murakami, thank you very much for your help. I was able to replicate this on my original data. I was wondering if you could explain what exactly we are doing to get that count.

            • 3. Re: Bar graph with one measure and multiple dimension
              Shinichiro Murakami

              HI Ivan,

               

              You mentioned different "Murakami", please remove  : )

               

              And could you mark my answer as correct to close the thread.

              Not from inbox but from original post.

               

               

               

              Thanks,

              Shin

              • 4. Re: Bar graph with one measure and multiple dimension
                Ivan Muccini

                This is to help others,

                I was able to find a solution that suited my needs. My database has a huge number of rows and columns. The above-proposed solution would duplicate all the other columns in the database. This would pose a problem for me because some of the columns are supposed to be unique values. Also, I had 3 more columns that had multiple values in each row. Either would have to create separate databases for each sheet to analyze each of the columns. Also added newer records would not be easy. So here is what I did:

                 

                I created calculated fields for the columns that had multiple values for the row. 1 calculated field for every unique value. That way for Request I created 4 new columns- Request1, Request2, Request3, and Request4. Check for the substring and add 1 under the particular column if the value is present.

                Drag the Measure values to Rows. Remove the measures you do not need from the Measure Values card.

                By default, Measure Values had numbers with the decimal part. So I changed the format.

                Then drag and drop the Measure Names into columns. It should automatically show up under Filter and Marks cards.

                to improve the appearance I added color and the total number of the count on the sheet. Also added few other dimensions into the Filter card, which was a requirement for me.