10 Replies Latest reply on Aug 17, 2017 1:05 PM by Joe Oppelt

    measures

    Tim Mullady

      Hello,

       

      A few questions:

       

      I've created a bunch of new calculations in Measures section.  How can I Name the columns instead of showing the calculations formula?

       

       

      Can I reference the Names of measures inside new calculations.  This keeps the formulas a lot simpler and easier to understand.

       

      Any information would be greatly appreciated.

       

      Thanks,

       

      Tim

        • 1. Re: measures
          Ray Givler

          Tim,

          If it's in Measures, you should be able to right-click and select Rename. or click and press F2, or click, pause, click.  If the calc is in the marks card, you can drag it to measures and rename it.

           

          You can use the new names in other calcs.

          HTH.

          • 2. Re: measures
            Joe Oppelt

            What Ray pointed out will take care of you, Tim, but I'm curious about what you are doing to get where you got.


            Are you double clicking in ROWS to open an in-line editor where you type in your code?


            In my opinion, a cleaner way to create a calc is to select "Create Calculated field".  One way is to click the down arrow that I circled here:

             

             

            You can also right click in empty space below the list of your dimension fields, or below the list of your measure fields, or below the list of your parameters.  And there are other ways as well.  This opens up a calc editor that lets you name the calc right there, and then enter your calc code.

            • 3. Re: measures
              Tim Mullady

              I was able to Edit the Alias and name them.  It won't let me use the alias in calculations though

              • 4. Re: measures
                Tim Mullady

                I'm right clicking on the Measure Value and selecting New Calculation.

                 

                I Edit Alias to name them but it won't let me use the names in new calculations

                • 5. Re: measures
                  Joe Oppelt

                  I think you're over-thinking this.

                   

                  Rename a calc like this:

                   

                  • 6. Re: measures
                    Tim Mullady

                    The calculation is not in the Data Source it's in the individual worksheet. 

                    • 7. Re: measures
                      Joe Oppelt

                      Mine is not in the data source either.  The little equal sign in front of it indicates that it's my own calc and not part of the actual data source.  Like I mentioned in my first reply, I don't like to create calcs on the shelves of the sheet (such as the ROWS shelf.)  I create them as I showed in the screen shot I added in my first reply.  THEN I put them on the sheet.

                       

                      In my last reply where I showed you how to rename the calc, I had created 1+1 on  ROW to demonstrate the rename.  From there I dragged it onto MEASURES.  Then I did the rename.

                      • 8. Re: measures
                        Michael Gillespie

                        Tim, can you upload a sample workbook of what you've done?  I'm with Joe on this: I think there's a basic misunderstanding of some core Tableau functionality in play, but I think we can help you figure it out.

                         

                        What exactly do you mean by this sentence: "The calculation is not in the Data Source it's in the individual worksheet."?

                         

                        Did you not create a new Calculated Field in the way Joe described?  It sounds like you are, but then it gets all confusing!

                         

                        The only way to get the "Edit alias" option is to try to edit a column heading or other viz component.  That's not what you need to do: you need to edit the actual calculated field that's over in your Measures pane.  It might be "down at the bottom" - you may need to scroll down in the Measures list to see it, or depending on the calculation you did, it might be in the Dimensions pane.

                         

                        So, again, a sample workbook would be really helpful!

                        • 9. Re: measures
                          Tim Mullady

                          I will try to put together some sample data. It's proprietary data

                           

                          Its a strange thing that I'm trying to accomplish.  My Data Set is doing a bunch of calculations in the manner that both of you are suggesting.  I created the calculated fields directly in the data source which works the same way Joe mentioned.  This part is working fine.

                           

                          I'm trying to perform the same type of calculations on Averages of my Data Set.  Because of this I'm averaging the data in a worksheet and then trying to recreate the calculations on a worksheet.

                           

                          An easy way would be to create a additional data set that is already Averaged but I'm trying to automate a process a bit and the data source is excel not a database query.

                          • 10. Re: measures
                            Joe Oppelt

                            You can hack up anonymized data as shown in this video:

                             

                            Anonymize your Tableau Package Data for Sharing

                             

                            But it seems to me it's not about the data.  It's about what you want to do from sheet to sheet.  And to that end, you can hack up the operations you are looking to do by using the Superstore data that comes with Tableau.

                             

                            You can create calculated fields in your workbook that are not part of the original data source tableau is reading in.