Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
badger123
Resolver I
Resolver I

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? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @badger123 

 

 In the place of Price, pls use INT( [Price] ). This will truncate the decimal part.

 

Thanks

Raj

View solution in original post

2 REPLIES 2
MFelix
Super User
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


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Hi @badger123 

 

 In the place of Price, pls use INT( [Price] ). This will truncate the decimal part.

 

Thanks

Raj

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.