3 Replies Latest reply on Dec 3, 2013 6:45 AM by Matt Lutton

    Import R files into Tableau

    Sid sharma


      1st Query: Kindly tell me if we can import R files(.rds files) in Tableau. If yes then How.


      2nd Query: Kindly suggest how to use Where function while doing custom calculation in calculated field.

      like I want to write expression like:  avg(sales where state = NY)-avg(sales where state=AT)      [kindly note , in my above statement I have assumed that i have 2 fields(column)  one state and second sales]


      Thanks in advance


        • 1. Re: Import R files into Tableau
          Matt Lutton

          #1) You cannot just import RDS files into Tableau, as far as I know.  R was integrated as a series of Table Calculations inside of Tableau--more info here: Tableau 8.1 and R | Tableau Software



          AVG(IF [State] = 'NY' then [Sales] END)


          AVG(IF [State] = 'AT' then [Sales] END)

          //alternatively, you could create a calculated field for each State's average, and then subtract the two fields (one extra step).


          Hope this helps.

          • 2. Re: Import R files into Tableau
            Sid sharma

            Hi Matthew,

            Thanks a ton my friend !!!

            Could you please answer one more query?

            I need to to know if it is possible to search object and filter the data according to that search.

            e.g If I wanted to know what is the sale in ABC country and then I have this option where I can write ABC and then it will filter my data on dashboard (as per ABC -that I have written in that search options) ..may be I am not able to explain it in my words ......I am looking for an option very similar to Search object in QlikView




            • 3. Re: Import R files into Tableau
              Matt Lutton

              If you create a Quick Filter on your Country field, you will be able to type in a search as well as check options for countries you want to view.  Does that help?


              Here's a very simple example of a quick filter in Tableau, with the Search option identified for you:

              Search Quick Filter.png


              I'm not sure if that is what you are looking for or not.  My suggestion is to play around with Tableau, try to re-create some visualizations you see, hang around the forums and read through posts, etc.  After you've had some time to experiment, some of these things will become very easy to find and you can ask questions here on the Forum as you encounter issues.  If you're just learning Tableau, the new book "Tableau Your Data!" covers most of the basics pretty well.