4 Replies Latest reply on Oct 13, 2013 1:18 PM by Joshua Milligan

    Currency Parameter

    Brandon Avants

      Hello Tableau Experts,


      I have a currency parameter that allows someone to select if they want the table to be in dollars or euros.  I would like the data to then show the numbers with the correct  symbol, $s or €s.  I cannot for the life of me figure out how to make that work.  Can someone assist? 




        • 1. Re: Currency Parameter
          Joshua Milligan



          I can't think of any good, clean way of doing this.  Each field can have its own formatting, but the formatting cannot be changed via parameter.  A calculated field could potentially use a parameter to dynamically use another field's value -- but the formatting would be determined by the calculated field's metadata and not the referenced field.


          A couple of options come to mind (neither very good):

          1. Use a couple of calculated fields to add the $ or € symbols to the label in addition to the value.  Or you may need to have a single calculated field to return the entire value as a formatted string (but you'll have to supply logic for thousands separators and decimal points).  And this won't work for axes, only for lables and text marks.
          2. Use the parameter to dynamically swap the view that uses the field or a copy of the field with the desired formatting. (assuming this is being used in a dashboard).  The technique is described here: Creating a Sheet Selector for a Dashboard | Tableau Software But I'd hate to maintain two views just for different formatting.





          1 of 1 people found this helpful
          • 2. Re: Currency Parameter
            Matt Lutton

            Here is an example of a parameter with number formatting done inside the calculated field that leverages the parameter--"Parameter Calc" in this workbook.  Hope this is helpful.  I didn't bother with commas, etc. but there are examples out there showing how to do that type of formatting as well.

            1 of 1 people found this helpful
            • 3. Re: Currency Parameter
              Brandon Avants

              I belive I will have to use this option Joshua.  I wish there was a simpler way.



              • 4. Re: Currency Parameter
                Joshua Milligan

                I agree.  If there isn't an idea (Ideas) out there already, then if you want, go ahead and create it and point us to it.  I'll give it a +1