1 Reply Latest reply on Apr 29, 2019 1:34 PM by Keshia Rose

    Two Issues (float multiply string and web data connections for currency)

    Koji Inoue

      Hello,

      I have been using Tableau for a few months now and now have several issues that I've looked everywhere in forums for solution on both subjects.

       

      This is just a demo to show, not the actual project.

       

      1. I have an xls file which has currency forex rates that are streamed from a website into the file, then I add the file to Tableau as a connection. Now, if I would like to multiply one of the columns by an integer, I get an error saying that "cannot multiply float value by string". I understand how in one forum post (https://community.tableau.com/thread/120206) that you need to convert the float value before the operation, however this piece of code did not work. It seems like the post was based on some older Tableau software that had it working for whatever reason.

       

       

      Secondary question to this: if an xls file with web data is set to refresh every hour, theoretically it should work with Tableau since the file is being updated before being passed to Tableau - right?

       

      2. Is there anyone out there who has experience using Web Data Connectors to pull foreign exchange values into their Tableau? There has been a number of posts in the forums, and other blogs with links to specific WDC for currency exchange, namely:

       

      https://suopa.github.io/tableau/wdc/fixerio/

      http://files.tableaujunkie.com/exchangeratesearch/exchangeratewebconnect.html

      https://andre347.github.io/tableau_wdc_fxrates/

       

      However, none of these worked. One was created with old Tableau Software and doesn't fill, the other two simply go into an infinite loop when the program is queried to load data. Is there anyone that has knowledge of a working WDC, to where building one is not needed? I saw in one solution, was to create a client with the API into the web page, then pass it to Tableau. However my teacher would not accept that as a solution, since it makes the business solution too complex.

       

      Extra Question:

       

      3. Google Finance Spreadsheet connection to Tableau

       

      The whole reason I am here in the first place, is because I had successfully used Google Sheets to load currency data and create new values based on those. However, when I share the files with my teacher he is asked for my login when he opens the file to grade my work. He then asked me to find a different solution, which is why I was looking into finance data feed into xls, or web data converters.

       

      If anyone knows how to load the Google Finance numbers into Tableau without having to prompt every user to login with credentials - that would help tremendously.

       

      I attached the xls, Test Worksheet that is pulling its data, and the extract file. Anyways, I am just looking for a simple way to add dynamic currency conversions into Tableau without too much hassle. I spent many hours researching this issue. With Power BI I could simply access a rates table like on xe.com and select the table there very quickly. It seems much more complicated with Tableau.

       

      Thanks,

      Koji

        • 1. Re: Two Issues (float multiply string and web data connections for currency)
          Keshia Rose

          Hi Koji,

           

          Not sure this is still relevant as it seems it might have been for an assignment but for future reference and anyone else who looks at this post in the future:

           

          1. It looks like your =EUR column came in as a string, you are right, you will first need to convert this to a float in order to do any math on it. To do this, click on the "Abc" icon next to the =EUR field in the dimensions pane and change it from String to Number (decimal). See Data Types - Tableau. You could also just wrap your field with FLOAT() if you want to only do this for your calculation: FLOAT([=EUR]) * 100.

          1b. Yes, the Excel file with updating data will work with Tableau. If you want to refresh the data in Tableau, select the data source on the Data menu and then select Refresh, or Extract > Refresh if it's an extract.

          2. Here is a simple WDC I put together using data from the Open Exchange Rates API: https://open-exchange-rate-wdc.glitch.me/. It pulls in the latest (tot he hour) exchange rates with USD as the currency base. You can sign up for a free API key here: Sign Up - Open Exchange Rates.

          3. You will need to share the Google Sheet with your teacher's Google account for them to be able to access it in Tableau Desktop. However, if you publish your workbook to Tableau Public, they will not need to log in to view your work.

          3b. If you were just looking to get data into Tableau from a table on a website, like XE Currency Table: USD - US Dollar, you can simply copy the table data and press Ctrl + V (Cmd + V) or click Data > Paste to paste the data into Tableau and start working with it.

           

          Hope this helps!

          Keshia