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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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