cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Displaying a number as Currency or Decimal

@SCTdan , Hi there.

 

Could you please explain your solution for a new guy in MS Flow, I am using the MS word connector and I have the same issue

 

Thanks in advance.

Highlighted
Frequent Visitor

Re: Displaying a number as Currency or Decimal


@sajarac wrote:

@SCTdan , Hi there.

 

Could you please explain your solution for a new guy in MS Flow, I am using the MS word connector and I have the same issue

 

Thanks in advance.


@sajarac - The solution @SCTdan posted was specific to SharePoint and (probably) wouldn't work the same for Word.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Displaying a number as Currency or Decimal

Thank you very much, I used the function that you proposed =Dollar([Myfield],2) to create a copy of my SP column, then vIa flow I have retrieved that value and it works fine.

 

Thanks again.

Highlighted
Regular Visitor

Re: Displaying a number as Currency or Decimal

Hi, 

 

Are you adding this formula on SharePoint? If yes, where exactly should we be inputting this formula? 

Also, are you able to apply a similar formula to change a fixed decimal to a percentage?
I am currently using SharePoint 2019.


Thanks,

Qadir

Kudo Kingpin
Kudo Kingpin

Re: Displaying a number as Currency or Decimal

Hi,

 

Add a new sharepoint column "Calculated Value"

 

And use this for the formula value

=Dollar([yourfieldname],2)

 

 

Capture.PNG

Highlighted
Helper I
Helper I

Re: Displaying a number as Currency or Decimal

I'm a few years late to the party here but wanted to offer another solution to this issue. I have a very intricate app that uses a flow I created to turn electric readings into html tables along with any items bought by someone. Essentially this app is a ledger creation app and the flow does a few things:

 

1 - takes out any items that are fully paid

2 - sorts the remaining items that have an outstanding balance

3 - adds each item from the ledger to an HTML table 

4 - saves the HTML table to a PDF document to be printed and sent as a bill (meter 1 might have an electric reading, a bag of ice, and a case of soda they bought that month, then the 2nd page is meter 2, 3rd is meter 3 and so on.)

 

This allows me to print bills and divide them for all 150+ meter locations in one click. The issue was converting and formatting all the values that I was pulling from both PowerApps as well as SharePoint. To do this I used the following logic:

 

if you already have an int/float value that you want to format you can simply use the formatNumber method they provide.

formatNumber(item()?['AmountDue'],'$0.00') - this will take the current item's amount due and format it as a currency. this will only work if the data is an int or a float, however.

 

if you have a string, on the other hand, the first step would be to convert that to an int/float value then to follow the above step. You could also combine them into one statement such as...

formatNumber(int(item()?['AmountDueString']),'$0.00') - this will do the same thing but convert the string to an int first

formatNumber(float(item()?['AmountDueString']),'$0.00') - this will do the same thing but convert the string to a float first

 

I use both of these in my current flow and it prints correct values for a dozen or so items per each of the 150+ meters.

 

 
Highlighted
Frequent Visitor

Re: Displaying a number as Currency or Decimal

This was written before they had the format number action in Flow. 😉  Now I just use that action with a currency format string (reference).

Highlighted
Frequent Visitor

Re: Displaying a number as Currency or Decimal

I had a float value so all I used was the formatNumber(variables('Value'),'$0.00'

Helpful resources

Announcements
Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Top Kudoed Authors
Users online (5,979)