3 Replies Latest reply on Oct 19, 2018 4:50 AM by Andreas Hinrichs

    Make year a separate variable (now in the title of variable)

    Eveline Vlassenroot

      Hi everyone,

       

      I want to make a variable year but I don't have this in a separate variable atm. This information is now in the title of the variable.

      What is the best way to start with this in Tableau?

       

      Kind regards,

      Eveline

        • 1. Re: Make year a separate variable (now in the title of variable)
          Andreas Hinrichs

          Hi Eveline,

          I'm afraid your sceenshot is not enough to understand or answer your question.

          When you say "This information is now in the title of the variable", do you mean it is in the name of the measure e.g. 2008 Aantal vreemdelingen represents 2008?

          In this case you have, at least visible for us, two measures: "Totale bevolking" and "Aantal vreemdelingen".

          To filter the selected measure to Show you need Parameter (to enter your selection) and a calculation:

          First add the Parameter (right click in measures after the end of the measures, Create Parameter)

          Then create the calculation(s).

          MyParm.JPG

          then right click on the same area to create the calculation.

          In this example I used 4 different Budget fields as source, you will to adapt the field names of course but using drag and drop makes that fast and easy.

          myCalc.JPG

          then you remove the 2017 Tot... from the Label and add your calculation field.

          That's it.

           

          Hope that helps

           

          Andreas

          • 2. Re: Make year a separate variable (now in the title of variable)
            Eveline Vlassenroot

            Hi,

             

            I think you are understanding it in the right way!

            But I do not completely get it..

            So I would like indeed to have two measures "Totale bevolking" and "Aantal vreemdelingen" and right now these are measured for each year  "2017 Totale bevolking" and "2017 Aantal vreemdelingen" and "2016 Totale bevolking" and "2016 Aantal vreemdelingen" and so on.

            But I want to create a separate measure for the year which is currently included only in the title.

             

            Kind regards,

            Eveline

            • 3. Re: Make year a separate variable (now in the title of variable)
              Andreas Hinrichs

              Hi Eveline,

              what I don't get is the meaning of "a separate measure for the year which is currently included only in the title."

              In Sheet2 the Header (from measures) contains the year.

              Is it that you refer to?

              Then the way described above is the right one for you.

              You create the Parameter as described, set Default value to "2017" to avoid empty Dashboard when opened.

              I created the Parameter and the two calculations (where calulations only Support 2015 to 2017, but I thinks you'll get how it works.

              the selected year is also in the title (instead of column Header).

               

               

              Andreas