Forum Discussion
Different currency symbol using measure
Hello everyone! I am trying to create a measure that dynamically changes the currency symbol depending on the country selected in a slicer. It looks a bit like this at the moment:
IF(SelectedCountry=1,"£"&Price,"$"&Price)
The problem with this is the number has lots and lots of decimal places, and ideally I just want it to show a whole number with the correct currency symbol, so rather than £16.1828490230 it would show £16.
Is this possible?
- Anonymous7 years ago
Hi badger123
In the place of Price, pls use INT( [Price] ). This will truncate the decimal part.
Thanks
Raj
2 Replies
- AnonymousNot applicable
Hi badger123
In the place of Price, pls use INT( [Price] ). This will truncate the decimal part.
Thanks
Raj
- MFelix
Super User
Hi badger123 ,
Change your measure to:
IF(SelectedCountry=1,Format([Price],"0£"),Format([Price];"0$"))
If you want to have decimal places make it like this
IF(SelectedCountry=1,Format([Price],"0.00£"),Format([Price];"0.00$"))
Be aware that instead of dot on the decimals can be comma depending on your regional settings.
Regards,
MFelix