6 Replies Latest reply on Jun 4, 2015 6:10 PM by Justin D'Cruze

    Calculation Functions (Determine Project Name/Workbook Name)

    Rick Girardi


      Hi,

       

      I want to programmatically determine the Tableau Server Project the Tableau Desktop Workbook is a member of.

       

      Is there a calculation function that will return the Tableau Server Project?

       

      Is there a calculation function that will return the Tableau Desktop Workbook name?

       

      I see that there is a function called - ISMEMBEROF() but that doesn't do the trick.

       

      Thanks,

       

      Rick

        • 1. Re: Calculation Functions (Determine Project Name/Workbook Name)
          Matt Lutton

          Rick Girardi wrote:

           


          Hi,

           

          I want to programmatically determine the Tableau Server Project the Tableau Desktop Workbook is a member of.

           

          Is there a calculation function that will return the Tableau Server Project?

           

          Is there a calculation function that will return the Tableau Desktop Workbook name?

           

          No to both questions. You would need to connect to the underlying PostGres DB to get information about content stored on the Server.

           

          http://onlinehelp.tableau.com/current/server/en-us/help.htm#adminview_postgres.htm

           

          The ISUSERNAME(), ISMEMBEROF(), etc. functions are there in order to create User Filters based on User/Group information on the Server.  Since user filtering is done based on User and/or Group names, these are the types of functions they make available to us.

           

          What are you hoping to achieve, exactly?   Calculations are stored as part of a data source, not the workbook itself, so it makes sense  that we cannot find out a Project through the Desktop product.  Once we are in desktop, we are connected to a downloaded version of the workbook and not a specific workbook on the Server.  Hopefully, that makes sense.

           

          Cheers!

          1 of 1 people found this helpful
          • 2. Re: Calculation Functions (Determine Project Name/Workbook Name)
            Rick Girardi

            Hi,

             

            I'm doing row level security via a table in my data warehouse.

             

            I was thinking of having three columns:

                 > Region

                 > User_ID

                 > Project_Name

             

            The table would look like the following:

                 Region_A     Rick     Null

                 Region_B     Rick     Null

                 Region_A     Rick     Region_Details

             

            I'm thinking given the above table I would be able to view Region_A and Region_B in all projects except Region_Details which I would be able to only see Region_A.

             

            I had a training class on Tableau Permissions from Tableau and learned that I should control permissions at the project level.

             

            So I was seeing if I could basically do the same thing when it came time to do row level security via my user table in my data warehouse.

             

            The actual filtering logic would be contained in the workbook in order to make it work I have to know which project or workbook I'm dealing with.

             

            Hopefully, that makes sense.

             

            Thanks,

             

            Rick

            • 3. Re: Calculation Functions (Determine Project Name/Workbook Name)
              Matt Lutton

              Unfortunately, I'm not clear on how you plan to use Project names.  You should only need usernames and groups in order to create the User Filtering needed in Tableau.

              • 4. Re: Calculation Functions (Determine Project Name/Workbook Name)
                Rick Girardi

                Hi,

                 

                Lets say I have six projects in Tableau Server.

                 

                In five of those projects I want Rick to be able to view data for Region_A and Region_B.

                 

                In project number six called Region_Details I only want Rick to view data for Region_A.

                 

                This is set up by the rules in the three column table in my data warehouse.

                 

                In order to do this I need to know what project is which.

                 

                Thanks,

                 

                Rick

                • 5. Re: Calculation Functions (Determine Project Name/Workbook Name)
                  Matt Lutton

                  I'm not seeing why you need get the Project name to set this up.  I believe you can accomplish this by setting permissions on your Projects in Tableau Server, setting up Groups of Users with permissions to their various Projects, and setting up your data to filter based on Username and/or Group in Tableau Server.

                   

                  Sorry I can't help more without seeing your data/environment.  But I think there's some confusion here about how to set up your User Filtering.  You may want to reach out to support@tableau.com as well, as they may be able to offer a bit more clarity/examples.  The KB article on User Filtering does a pretty good job of introducing the basics:

                   

                  User Filters and Row Level Security | Tableau Software

                  • 6. Re: Calculation Functions (Determine Project Name/Workbook Name)
                    Justin D'Cruze

                    Rick Girardi wrote:

                     

                     

                     

                    I had a training class on Tableau Permissions from Tableau and learned that I should control permissions at the project level.

                     

                    So I was seeing if I could basically do the same thing when it came time to do row level security via my user table in my data warehouse.

                     

                     

                    I think this might be where you're getting confused.....it's absolutely true that you should control permissions at the project level, BUT the way you do that is by assigning permissions based on Groups - you shouldn't need to know the Project name or identifier.

                    If you're not the server/site admin you might need some help from the administrators setting up the groups as per your requirements, but the ISMEMBEROF() function should cater for your scenario if you tie Groups to Projects appropriately.