Power Automate Exchange

Please login or click SIGN UP FOR FREE to create your FlowUG account to join this user group.
Expand all | Collapse all

Decimals (when .00) of a number are removed when creating a CSV table

Jump to Best Answer
  • 1.  Decimals (when .00) of a number are removed when creating a CSV table

    Posted Mar 03, 2021 09:08 AM
    Hi,

    I'm having a flow where I have a number formatted item and when I convert it into a CSV file it removes the decimals when they are .00. For decimals like .22 it work fine. But for my flow it is essential to have these decimals in there if they are .00 or if they have a value. I tried Number formatting and set it into a string but nothing seem to solve my challenge. Does any of you have any idea to solve this?

    Example:
    Input number: 100.00
    Output in CSV: 100

    Many thanks!

    Thomas
    Netherlands

    ------------------------------
    Thomas Kick
    ------------------------------


  • 2.  RE: Decimals (when .00) of a number are removed when creating a CSV table
    Best Answer

    Top Contributor
    Posted Mar 04, 2021 02:15 AM
    You can convert the input number to a string to solve this. Prior to the Create CSV action, use a Select and in the column mapping right hand side as the expression string(item()?['1-Initial Response']). You need to sort your schema though, you have 2 items in an array that don't share any common properties.

    ------------------------------
    Will Page
    Technical consultant
    Christchurch, NZ
    ------------------------------



  • 3.  RE: Decimals (when .00) of a number are removed when creating a CSV table

    Posted Mar 04, 2021 05:56 AM
    Hi Will,

    Thank you for your answer.

    I did used the String expression only I was under the impression it did not work because I opened the CSV file in Excel. However, when I open the CSV in Notepad++ I see it has worked and it does show .00 in the field.

    Thank you for opening my eyes!

    Kind regards, Thomas

    ------------------------------
    Thomas Kick
    ------------------------------