Sébastien Medhat 2 Posted March 17, 2022 Share Posted March 17, 2022 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 More sharing options...
Kevin Flynn Posted March 17, 2022 Share Posted March 17, 2022 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 More sharing options...
Sébastien Medhat 2 Posted March 17, 2022 Author Share Posted March 17, 2022 Hello, Thank you very much for your quick and clear answer. Actually, I like pretty much the first idea, but I don't know how to implement it. Is it possible please to share at least your IronPython code Thank you very much :) Link to comment Share on other sites More sharing options...
Kevin Flynn Posted March 17, 2022 Share Posted March 17, 2022 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now