Exporting Dataset as CSV ignores the Round function

Hi,

I have a dataset that I need to extract. In the ETL, I round the column to 2 decimal places. When I extract the data and open it in MSExcel, I see the 2 decimal places. However, if I open it in notepad, I see multiple decimal places. How can I avoid this to happen? Any advice would be appreciated. Thank you.

Best Answer

  • Data_Devon
    Data_Devon Contributor
    Answer ✓

    Assuming that you want the column to stay rounded to 2 decimal places, you'll have to convert it to text once you are satisfied with the rounding.

    Then, upon export, Notepad will recognize it as text (not an integer) so it won't apply any math.

    Alternatively, you could truncate or trim the integer so that there isn't more than 2 decimal places contained within the value. This way would maintain the data type as a number but Notepad wouldn't have any further decimal places to abstract from.

    Let us know if that works or if I'm missing something,

    ✅Did this solve your problem? Accept it as a solution!

    ❤️Did you love this answer? Mark it as "Awesome"!

    👍Do you agree with this process? Click "Agree"!

Answers

  • Data_Devon
    Data_Devon Contributor
    Answer ✓

    Assuming that you want the column to stay rounded to 2 decimal places, you'll have to convert it to text once you are satisfied with the rounding.

    Then, upon export, Notepad will recognize it as text (not an integer) so it won't apply any math.

    Alternatively, you could truncate or trim the integer so that there isn't more than 2 decimal places contained within the value. This way would maintain the data type as a number but Notepad wouldn't have any further decimal places to abstract from.

    Let us know if that works or if I'm missing something,

    ✅Did this solve your problem? Accept it as a solution!

    ❤️Did you love this answer? Mark it as "Awesome"!

    👍Do you agree with this process? Click "Agree"!