cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Walter1
Level: Powered On

Format number with thousands separator in Flow email

Would appreciate any suggestion on how to format numbers in the emails that Flow generates.

 

I've got a Flow that generates an email requesting approval triggered by a button in PowerApps.

The body of the email references a couple of numbers from a Sharepoint list.

In the Sharepoint list these numbers are formatted as currency, for example $150,200.

 

In the email that Flow generates these numbers show without the currency symbol and without the thousands separator. So, for example: 150200.

 

I can easily add the currency symbol in but can't seem to get the thousands separator back in.

Any suggestions on how to accomplish this?  Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Format number with thousands separator in Flow email

Hi @Walter1,

 

I have made a test on the function to split "152500" into "152" and "500", then add the "," in between so it shows "152,500",you could refer to screenshot below to create the flow:

Capture.PNG

The expression in the Compose 2 as below:

substring(string(outputs('Compose')),sub(length(string(outputs('Compose'))),3),3)

The expression in the Compose 3 as below:

substring(string(outputs('Compose')),0,sub(length(string(outputs('Compose'))),3))

The expression in the Compose 4 as below:

concat('$',outputs('Compose_3'),',',outputs('Compose_2'))

The flow would run successfully as below:

Capture.PNG

Capture.PNG

 

Best regards,

Alice

 

 

 

 

10 REPLIES 10
Community Support Team
Community Support Team

Re: Format number with thousands separator in Flow email

Hi @Walter1,

 

I have made a test on my side and couldn't find a way to display the currency type value as a currency value in microsoft flow currently.

 

I afraid that microsoft could only display the type value as a int value and there is no any way to display the currency type value as a currency value in microsoft flow currently.

 

If you would like the microsoft flow to display the currency type value as a currency value,

please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Best regards,

Alice

 

Walter1
Level: Powered On

Re: Format number with thousands separator in Flow email

Thanks.

 

I guess with the currency I can simply add currency symbols in the email body text.

 

A workaround for adding in the thousands separators could be done by splitting the number that comes from sharepoint and adding in commas.  For example, split "152500" into "152" and "500", then add the "," in between so it shows "152,500" in the email text.  Although I'm not sure how to actually do this...

 

Is there an easier way to make it show the thousands separators?

Community Support Team
Community Support Team

Re: Format number with thousands separator in Flow email

Hi @Walter1,

 

I have made a test on the function to split "152500" into "152" and "500", then add the "," in between so it shows "152,500",you could refer to screenshot below to create the flow:

Capture.PNG

The expression in the Compose 2 as below:

substring(string(outputs('Compose')),sub(length(string(outputs('Compose'))),3),3)

The expression in the Compose 3 as below:

substring(string(outputs('Compose')),0,sub(length(string(outputs('Compose'))),3))

The expression in the Compose 4 as below:

concat('$',outputs('Compose_3'),',',outputs('Compose_2'))

The flow would run successfully as below:

Capture.PNG

Capture.PNG

 

Best regards,

Alice

 

 

 

 

Re: Format number with thousands separator in Flow email

The problem with this solution is I do not see how this takes into consideration that not every number is going to be 6 digits. Sometimes is is going to be 2 or 3 or 7.  Is there not a funtion that will format a number this way?

emilymorrison
Level: Powered On

Re: Format number with thousands separator in Flow email

Thanks, worked for me

Highlighted
degvalentine
Level: Powered On

Re: Format number with thousands separator in Flow email

Here's an expression to format a float less than 1 million into a string for currency (not including the dollar symbol) with a thousands separator and 2 digits after the decimal.

  123.4 => "123.40"
   1234 => "1,234.00"
1234.05 => "1,234.05"
0.1 => "0.10"

Uses variables('myFloat') to represent the number you want to format for currency.

concat(
  if(
    greaterOrEquals(
      variables('myFloat'),
      1000
    ),
    concat(
      substring(
        string(variables('myFloat')),
        0,
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3))
      ),
      ',',
      substring(
        first(split(string(variables('myFloat')), '.')),
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3)),
        min(3, length(first(split(string(variables('myFloat')), '.'))))
      )
    ),
    first(split(string(variables('myFloat')), '.'))
  ),
  '.',
  if(
    contains(string(variables('myFloat')), '.'),
    concat(
      last(split(string(variables('myFloat')), '.')),
      if(
        less(length(last(split(string(variables('myFloat')), '.'))), 2),
        '0',
        ''
      )
    ),
    '00'
  )
)

Or, all in one line:

concat(if(greaterOrEquals(variables('myFloat'),1000),concat(substring(string(variables('myFloat')),0,max(0,sub(length(first(split(string(variables('myFloat')),'.'))),3))),',',substring(first(split(string(variables('myFloat')),'.')),max(0,sub(length(first(split(string(variables('myFloat')),'.'))),3)),min(3,length(first(split(string(variables('myFloat')),'.')))))),first(split(string(variables('myFloat')),'.'))),'.',if(contains(string(variables('myFloat')),'.'),concat(last(split(string(variables('myFloat')),'.')),if(less(length(last(split(string(variables('myFloat')),'.'))),2),'0','')),'00'))

It assumes the number was already rounded to hundreths (see my expression for rounding to hundreths in another post).

 

Here's the expression for COMPLETE currency formatting for numbers under 1 million:

concat('$',if(greaterOrEquals(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000),1000),concat(substring(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),0,max(0,sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),'.'))),3))),',',substring(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),'.')),max(0,sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),'.'))),3)),min(3,length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),'.')))))),first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),'.'))),'.',if(contains(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),'.'),concat(last(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),'.')),if(less(length(last(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),'.'))),2),'0','')),'00'))

It just injects the rounding expression from the linked post into the formatting expression in this post. It isn't the most efficient way to do this, I'm sure, but it works. Besides, what's a few dozen extra functions in a workaround expression for what javascript can accomplish with "myFloat.toFixed(2)"?

 

With the rounding expression, here are results you can expect:

2019-06-19 11_10_07-Run History _ Microsoft Flow.png2019-06-19 11_50_12-Run History _ Microsoft Flow.png

asdfaf4
Level: Powered On

Re: Format number with thousands separator in Flow email

Amazing kindness being displayed here.  Thanks for sharing.  I do agree, MS needs an equivalent action for "numbers" as they have for "dates/time" conversion.

degvalentine
Level: Powered On

Re: Format number with thousands separator in Flow email

Same process, expanded for values under 1 trillion.

 

concat(
  if(
    greaterOrEquals(
      variables('myFloat'),
      1000000000
    ),
    concat(
      substring(
        string(variables('myFloat')),
        0,
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 9))
      ),
      ',',
      substring(
        string(variables('myFloat')),
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 9)),
        3
      ),
      ',',
      substring(
        string(variables('myFloat')),
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 6)),
        3
      ),
      ',',
      substring(
        first(split(string(variables('myFloat')), '.')),
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3)),
        min(3, length(first(split(string(variables('myFloat')), '.'))))
      )
    ),
    if(
      greaterOrEquals(
        variables('myFloat'),
        1000000
      ),
      concat(
        substring(
          string(variables('myFloat')),
          0,
          max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 6))
        ),
        ',',
        substring(
          string(variables('myFloat')),
          max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 6)),
          3
        ),
        ',',
        substring(
          first(split(string(variables('myFloat')), '.')),
          max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3)),
          min(3, length(first(split(string(variables('myFloat')), '.'))))
        )
      ),
      if(
        greaterOrEquals(
          variables('myFloat'),
          1000
        ),
        concat(
          substring(
            string(variables('myFloat')),
            0,
            max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3))
          ),
          ',',
          substring(
            first(split(string(variables('myFloat')), '.')),
            max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3)),
            min(3, length(first(split(string(variables('myFloat')), '.'))))
          )
        ),
        first(split(string(variables('myFloat')), '.'))
      )
    )
  ),
  '.',
  if(
    contains(string(variables('myFloat')), '.'),
    concat(
      last(split(string(variables('myFloat')), '.')),
      if(
        less(length(last(split(string(variables('myFloat')), '.'))), 2),
        '0',
        ''
      )
    ),
    '00'
  )
)

 

 

And all in one line with the fraction rounded to 2 digits:

 

concat(if(greaterOrEquals(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000),1000000000),concat(substring(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)),0,max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 9))),',',substring(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 9)),3),',',substring(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 6)),3),',',substring(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.')),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 3)),min(3, length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.')))))),if(greaterOrEquals(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000),1000000),concat(substring(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)),0,max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 6))),',',substring(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 6)),3),',',substring(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.')),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 3)),min(3, length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.')))))),if(greaterOrEquals(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000),1000),concat(substring(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)),0,max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 3))),',',substring(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.')),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 3)),min(3, length(first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.')))))),first(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))))),'.',if(contains(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'),concat(last(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.')),if(less(length(last(split(string(div(add(mul(variables('myFloat'), 1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'), 1000), 10),5),10,0),mod(mul(variables('myFloat'), 1000), 10))),1000)), '.'))), 2),'0','')),'00'))

 

 

2019-07-19 12_16_49-Run History _ Microsoft Flow.png

 

If you need to format values over 1 trillion, I believe the correct formatting for national debt is simply 😱.

Mattw112IG
Level 8

Re: Format number with thousands separator in Flow email

awesome, thanks

degvalentine
Level: Powered On

Re: Format number with thousands separator in Flow email

Credit to @Mattw112IG who reported a bug, where the code didn't check for values of length under 3.

 

I blame Flow's insane dedication to declarative processing of "if()" statements (i.e. evaluating BOTH the true/false parts before returning one).

 

Here's the corrected version:

 

concat(
  if(
    greaterOrEquals(
      variables('myFloat'),
      1000000000
    ),
    concat(
      substring(
        string(variables('myFloat')),
        0,
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 9))
      ),
      ',',
      substring(
        string(variables('myFloat')),
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 9)),
        min(3, length(string(variables('myFloat'))))
      ),
      ',',
      substring(
        string(variables('myFloat')),
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 6)),
        min(3, length(string(variables('myFloat'))))
      ),
      ',',
      substring(
        first(split(string(variables('myFloat')), '.')),
        max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3)),
        min(3, length(first(split(string(variables('myFloat')), '.'))))
      )
    ),
    if(
      greaterOrEquals(
        variables('myFloat'),
        1000000
      ),
      concat(
        substring(
          string(variables('myFloat')),
          0,
          max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 6))
        ),
        ',',
        substring(
          string(variables('myFloat')),
          max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 6)),
          min(3, length(string(variables('myFloat'))))
        ),
        ',',
        substring(
          first(split(string(variables('myFloat')), '.')),
          max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3)),
          min(3, length(first(split(string(variables('myFloat')), '.'))))
        )
      ),
      if(
        greaterOrEquals(
          variables('myFloat'),
          1000
        ),
        concat(
          substring(
            string(variables('myFloat')),
            0,
            max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3))
          ),
          ',',
          substring(
            first(split(string(variables('myFloat')), '.')),
            max(0, sub(length(first(split(string(variables('myFloat')), '.'))), 3)),
            min(3, length(first(split(string(variables('myFloat')), '.'))))
          )
        ),
        first(split(string(variables('myFloat')), '.'))
      )
    )
  ),
  '.',
  if(
    contains(string(variables('myFloat')), '.'),
    concat(
      last(split(string(variables('myFloat')), '.')),
      if(
        less(length(last(split(string(variables('myFloat')), '.'))), 2),
        '0',
        ''
      )
    ),
    '00'
  )
)

 

And the corrected version with number rounding, all inlined:

 

concat(if(greaterOrEquals(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000),1000000000),concat(substring(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),0,max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 9))),',',substring(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 9)),min(3, length(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000))))),',',substring(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 6)),min(3, length(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000))))),',',substring(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.')),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 3)),min(3, length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.')))))),if(greaterOrEquals(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000),1000000),concat(substring(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),0,max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 6))),',',substring(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 6)),min(3, length(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000))))),',',substring(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.')),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 3)),min(3, length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.')))))),if(greaterOrEquals(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000),1000),concat(substring(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)),0,max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 3))),',',substring(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.')),max(0, sub(length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 3)),min(3, length(first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.')))))),first(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))))),'.',if(contains(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'),concat(last(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.')),if(less(length(last(split(string(div(add(mul(variables('myFloat'),1000),sub(if(greaterOrEquals(mod(mul(variables('myFloat'),1000),10),5),10,0),mod(mul(variables('myFloat'),1000),10))),1000)), '.'))), 2),'0','')),'00'))

And the proof:

 

2019-08-12 10_43_31-Run History _ Microsoft Flow.png

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 44 members 3,991 guests
Please welcome our newest community members: