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
Anonymous
Not applicable

Convert text with commas into value

Hi all,

 

My database has some numerical fields that come in text and some of them have commas, by the time to convert the text to a value, the comma disappear and my number become  "bigger". For example if I have 100,00 I will have 10000, I also attach a printscreen .

 

I hope that anyone can help me

 

Best Regards

 

 

PBI example.jpg

1 ACCEPTED SOLUTION

Oh, I guess I misunderstood. Then replace "," with "." instead of blank.

View solution in original post

8 REPLIES 8
PattemManohar
Community Champion
Community Champion

I hope you are looking to achieve this...

 

InputInput

I've splitted the Data field into two parts i.e before comma and after comma. Duplicated Part2 field to be a decimal type.

 

Then added a final output field as below

 

FinalOutput = IF(VALUE(NumText[Part2Num])=0,NumText[Part1],NumText[Data])

 

OutputOutput





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

Proud to be a PBI Community Champion




Chihiro
Solution Sage
Solution Sage

Hmm, I'd do this in Query Editor. Right click on the column and replace "," with blank. Then change data type to number.

Greg_Deckler
Super User
Super User

So, are you saying that the commas in your case are decimals? So that 100,00 should be 100.00?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

100,00 should be 100 and 99,85 should be 99,85 and not 9985 for example. The commas disappear at all

These are always tough because I really can't play with the regional language settings which I believe handle things like decimals and dates in different formats. Sounds like your's might be set to English perhaps? Seems like if you had the right regional settings that Power BI would recognize those commas as decimals and convert them correctly to numbers by just changine the type.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Oh, I guess I misunderstood. Then replace "," with "." instead of blank.

This one comment saved my life today. Thanks man! 

Anonymous
Not applicable

I've used several formulas to reach my final goal, and I was successfull, thank you guys 

 

Test = VALUE(if(find(",";Production[PRODUCTION EBITDA YTD];1;0)>0;replace(Production[PRODUCTION EBITDA YTD];find(",";Production[PRODUCTION EBITDA YTD];1;0);1;".");Production[PRODUCTION EBITDA YTD]))

 

Best regards

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.