Jump to content

Currency format depending on a table's column


Sébastien Medhat 2

Recommended Posts

Hello,

Can I change the KPI data format depending on the user currency selection

Indeed, a drop-down list property control shows all the currency values based on a data column. A KPI calculates and shows the correct amount (=calculated value) based on the user currency selection and on a change table to make the conversion.

I would like to add dynamically the currency symbol to the KPI amount based on the currency user selection.

Thank you for your help.

Link to comment
Share on other sites

I have done this previously on an older version of Spotfire. I don't know if the newest versions have a better way. But I did the following:

Put 5 image buttons of different flags (us, uk, russian...). Then with ironpython I set a document property to the currency symbol (or just the currency itself). I would then on the KPI I would do a custom expression with a Case Statement and or just something like {currency symbol} + sum([amount column]).

That or I also previously just set all the format as number, and put in a text area up top that said "All Currency is in {Document Property you set}".

Link to comment
Share on other sites

Just attached one I quickly wrote (just wrote the selection part).

The Ironpython would just have a Script Parameter of "Currency".

Document.Properties["CurrencyCode"] = Currency

You will set this Script Parameter for each Flag or button (ie Currency = USD, Currency = 'LB" so on .

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...