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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
iannes
New Member

Scientific Notation read as text

My data source has numbers like: 2.0458e+2 and 3.0465e-4 

They are currently being read as text, changing collum type in the query editor is not working

How do i  make power BI read them as a numeric value?

 

1 ACCEPTED SOLUTION

BTW, I entered those numbers into an Enter Data query and M converted them. Here is my query:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtIzMDG1SNU2UorViVYyBvLMTFN1TZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [eNumbers = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"eNumbers", type number}})
in
    #"Changed Type"

Follow on LinkedIn
@ 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...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

You may have to parse it by keying on the "e" and calculate it manually.


Follow on LinkedIn
@ 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...

BTW, I entered those numbers into an Enter Data query and M converted them. Here is my query:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMtIzMDG1SNU2UorViVYyBvLMTFN1TZRiYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [eNumbers = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"eNumbers", type number}})
in
    #"Changed Type"

Follow on LinkedIn
@ 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

Hi,

 

I have a issue about some numbers in a column (messure numbers), maybe you can help me out.

Numbers in scientific notation.JPG

changing collum type in the query editor and modeling is not working

 

How do i make power BI read them as a numeric value?

 

expected numbers.JPG

this picture above is an example the numbers should be.

 

 

Thank you

 

Best regards

 

Seb

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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