SmallFry
SmallFry

Reputation: 153

Convert Scientific Notation to decimal in Azure Data Flows

I have an input file that has a column with mixture of decimal and scientific notation values. I have tried to convert the column using toDecimal, which seems to work for the non-zero decimals and the scientific notation values, but zeroes are converted to scientific notation. Is it possible to keep the zero values as plain zeroes?

Converting column to decimal

Upvotes: 0

Views: 1153

Answers (1)

NiharikaMoola
NiharikaMoola

Reputation: 5074

Looks like by default 0/0.0 is converted to exponential value when using the decimal function. One way is to convert decimal to string.

case(Value == 0.0, toString(0.0),toString(toDecimal(Value,20,10)))

enter image description here

Upvotes: 1

Related Questions