cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

How to roundup decimals and add comma in a chart data lable

Hi, 

 

I was able to create a collection and create a chart with your wonderful support. Now I have a challenge in the chart as it shows the values with many decimals. It is same in the collection a well. How to get rid of it?

 

 Capture.PNG

 

I need to show as e.g 900,000

 

Osmand

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: How to roundup decimals and add comma in a chart data lable

Hi @OsmandFernando ,

Based on the needs that you mentioned, I think the Text function could achieve your needs. Please consider take a try with the following workaround:

Set the Items property of the Pie Chart control to following:

AddColumns(
           LoanChartNew,
           "TotalOutstandingValue",
           Text(Value(Total_x0020_Outstanding), "##,###") // LoanValueColumn represents the column you use to display the loan value, e.g. 900000.000.. within your Pie Chart
)

Then set the Series property of your Pie Chart control to following:

TotalOutstandingValue

 

In addition, you could consider modify your ClearCollect formula as below:

ClearCollect(
             LoanChartNew, 
             AddColumns(             
                        ShowColumns('Loan Table',"Year","Title","Total_x0020_Outstanding").
                        "TotalOutstandingValue",
                         Text(Value(Total_x0020_Outstanding), "##,###")
             )
)

then set the Items property of the Pie Chart control to following:

LoanChartNew

set the Series property of your Pie Chart control to following:

 

TotalOutstandingValue

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

12 REPLIES 12
Highlighted
Super User
Super User

Re: How to roundup decimals and add comma in a chart data lable

Have you tried using the Round function? 

 

RoundNumberDecimalPlaces ) 

 

In your case it will be Round(Number, 0)

 

Let me know if this doesn't work for you. 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

 

Hardit Bhatia
https://www.thepoweraddict.com

Highlighted
Post Prodigy
Post Prodigy

Re: How to roundup decimals and add comma in a chart data lable

@PowerAddict Thank you for your reply. To where I should apply it ?

Highlighted
Super User
Super User

Re: How to roundup decimals and add comma in a chart data lable

How are you populating your chart? OR where are you defining the data for your chart?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://www.thepoweraddict.com
Highlighted
Post Prodigy
Post Prodigy

Re: How to roundup decimals and add comma in a chart data lable

as I mentioned the data coming to the chart from the collection. Collection it self is having that long decimals

@PowerAddict 

Highlighted
Super User
Super User

Re: How to roundup decimals and add comma in a chart data lable

What is the Items property of the chart set to? 

 

Is it something like ChartCollection.Value?

 

If so, set it to Round(ChartCollection.Value,0)

 

Let me know if this helps.

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

 

Hardit Bhatia
https://www.thepoweraddict.com

Highlighted
Post Prodigy
Post Prodigy

Re: How to roundup decimals and add comma in a chart data lable

This is what I have. I tried Round(LoanChartNew.Total_x0020_Outstanding,0) but did not work

 

@PowerAddict 

 

Capture.PNG

Highlighted
Super User
Super User

Re: How to roundup decimals and add comma in a chart data lable

So nothing changed? Or did you get an error? 

 

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit Bhatia
https://www.thepoweraddict.com

Highlighted
Post Prodigy
Post Prodigy

Re: How to roundup decimals and add comma in a chart data lable

I did not get anything, Chart went blank

Highlighted
Community Support
Community Support

Re: How to roundup decimals and add comma in a chart data lable

Hi @OsmandFernando ,

Could you please share a bit more the column value you used within your Pie Chart to display the number value? Is it a Number type column or a Calculated type column?

 

Based on the issue that you mentioned, I think the AddColumns function and Text function could achieve your needs. I have made a test on my side, please consider take a try with the following workaround:

Set the Items property of the Pie Chart control to following:

 

AddColumns(
           LoanChartNew.Total_x0020_Outstanding,
           "LoanFormatValue",
           Text(Value(LoanValueColumn), "##,###") // LoanValueColumn represents the column you use to display the loan value, e.g. 900000.000.. within your Pie Chart
)

 

Then set the Series property of your Pie Chart control to following:

 

LoanFormatValue

 

then the formatted loan value would be displayed within your Pie Chart.

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,362)