3 Replies Latest reply on Jul 12, 2016 11:59 AM by Chris Dickson

    select the correct variable by using filtering

    naveen ganpat

      Hi All,

      The following problem I have and I am struggling with it for some time now. I have a rather large set of data. I want to set up this data into a table. In one of the columns there should a variable that is for comparison purposes. It is this particular variable that I am after. My data can be simplified as follows:

       

      Customer

      Period

      Scenario

      Colour

      At 201312

      Tim

      201312

      1

      blue

      VARIABLE01

      Tim

      201412

      1

      red

      VARIABLE01

      Tim

      201512

      1

      green

      VARIABLE01

      Tim

      201312

      1

      VARIABLE01

      VARIABLE01

      John

      201412

      2

      red

      VARIABLE02

      John

      201312

      2

      VARIABLE02

      VARIABLE02

      John

      201512

      2

      blue

      VARIABLE02

      John

      201412

      3

      red

      VARIABLE02

      Pierre

      201312

      3

      VARIABLE03

      VARIABLE03

      Pierre

      201512

      3

      green

      VARIABLE03

      Pierre

      201412

      3

      blue

      VARIABLE03

       

      What I want is in the last column (called "At 201312") to display the variable for each customer for the “Period” 201312. In other words, I need to filter on Customer and Period for each name.

       

      In reality there are a number of more columns to filter on.

       

      What formula should I use?

      Should I use a measure?

       

      Thanks,

       

      Naveen

        • 1. Re: select the correct variable by using filtering
          lei.chen.0

          Hello naveen,

           

          One missing information is that, there's no description about the logic how you pick up the color for each of the customer at selected period.

          Anyway, I made a sample based on my imagination of your requirements.

          Please refer to the attached workbook for details.

          LOD is used.

           

          Regards

          • 2. Re: select the correct variable by using filtering
            naveen ganpat

            Hi Lei,

             

            Thanks for your quick response. I am a newbie and after downloading I tried to open this and get the following message:

             

            "The requested workbook does not exist on Tableau Public.  Only workbooks that are currently available on Tableau Public may be opened.The requested workbook does not exist on Tableau Public.  Only workbooks that are currently available on Tableau Public may be opened."

             

            What am I doing wrong?

             

            BTW Judging from the screenshot I think we are there (I think...).

             

            Thanks,

             

            Naveen

            • 3. Re: select the correct variable by using filtering
              Chris Dickson

              Hi Naveen,

               

              you have installed Tableau Public, the free to use version of Tableau.

               

              The limitation is that a workbook has to exist on tableau public for you to open it, to open the workbook Lei has created for you Lei would have to publish it to tableau public or you will need to download the free Full Tableau Desktop trial.

               

              in case neither of the above are an option the calcualtion Lei created for you is:

               

              { FIXED [Customer]:

              MAX(IF [Period]=[Select Period] THEN [Colour] END)}